#!/bin/bash # customize these WGET=/usr/bin/wget ICS2ORG=/home/lemon/bin/ical2org.awk WORK_ICSFILE=/home/lemon/ownCloud/org/work.ics WORK_ORGFILE=/home/lemon/ownCloud/org/work_cal.org WORK_URL=https://calendar.google.com/calendar/ical/matthew.lemon%40gmail.com/private-5b9d1efdec3e07b601e48e01e6b2d5c9/basic.ics HOME_ICSFILE=/home/lemon/ownCloud/org/home.ics HOME_ORGFILE=/home/lemon/ownCloud/org/home_cal.org HOME_URL=https://calendar.google.com/calendar/ical/12panp3nqdbmm9df4if9jigigo%40group.calendar.google.com/private-4b7e890b479d67c3cf66c4119c80ec63/basic.ics ONCALL_ICSFILE=/home/lemon/ownCloud/org/oncall.ics ONCALL_ORGFILE=/home/lemon/ownCloud/org/oncall_cal.org ONCALL_URL=https://calendar.google.com/calendar/ical/od5ch3rahhapi4e3sgkij8jkhg%40group.calendar.google.com/private-ee0dcd7197d05da273de5c32db73ac5d/basic.ics MYTASKSCALL_ICSFILE=/home/lemon/ownCloud/org/mytasks.ics MYTASKSCALL_ORGFILE=/home/lemon/ownCloud/org/mytasks_cal.org MYTASKSCALL_URL=https://calendar.google.com/calendar/ical/1egrujsm7tkp6unaenu2354mq4%40group.calendar.google.com/private-5d95863285306565a20aeb791d591f55/basic.ics # no customization needed below $WGET -O $WORK_ICSFILE $WORK_URL gawk -f $ICS2ORG $WORK_ICSFILE > $WORK_ORGFILE $WGET -O $HOME_ICSFILE $HOME_URL gawk -f $ICS2ORG $HOME_ICSFILE > $HOME_ORGFILE $WGET -O $ONCALL_ICSFILE $ONCALL_URL gawk -f $ICS2ORG $ONCALL_ICSFILE > $ONCALL_ORGFILE $WGET -O $MYTASKSCALL_ICSFILE $MYTASKSCALL_URL gawk -f $ICS2ORG $MYTASKSCALL_ICSFILE > $MYTASKSCALL_ORGFILE