pull-ical-files 332 B

123456789101112131415
  1. #!/bin/sh
  2. OUTPUT_FILE=~/org/ical.org
  3. while read cal ; do
  4. URL=$(echo $cal | awk -e '{print $1}')
  5. OUT=$(echo $cal | awk -e '{print $2}')
  6. OUT=${OUT:-${OUTPUT_FILE}}
  7. ical2org -a "${OUT}" -d "${OUT}" -dupinput "${URL}"
  8. done <~/.dotfiles/ical.txt
  9. cd ~/org || exit 1
  10. git add ical.org
  11. git commit -m "Pulled ical files"