sessionscripter 403 B

1234567891011121314151617181920
  1. #! /bin/zsh -f
  2. date=(`date +%F`)
  3. subject=(`echo $1 | sed -e "s/ /-/g"`)
  4. filename=~/sessions/${date}-${subject}.sessionscript
  5. timingfile=~/sessions/${date}-${subject}.timing
  6. #echo Recording session $1 as $filename
  7. if [ -d ~/sessions ] ; then
  8. sleep 0.05s
  9. else
  10. mkdir ~/sessions
  11. fi
  12. script -f $filename
  13. cd ~/sessions
  14. git add ${date}-${subject}.sessionscript ${date}-${subject}.timing
  15. git commit