Advertisement
Guest User

Setting the output filename for SimpleScreenRecorder

a guest
Feb 23rd, 2015
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.68 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Setting the output filename for SimpleScreenRecorder
  4.  
  5. CONFIG_FILE=/home/peachman/.ssr/settings.conf
  6. CONFIG_TEMP=/home/peachman/.ssr/temp.conf
  7. PATH1=file=/home/peachman/Desktop/screenrecord.*.mkv
  8. PATH2=file=/home/peachman/Desktop/screenrecord-$(date +%Y%m%d_%H_%M_%S).mkv
  9.  
  10. # if config file exists
  11. if [[ -f $CONFIG_FILE ]]; then
  12.     # change the output filename in the config file
  13.     cat $CONFIG_FILE | sed -e 's#'"$PATH1"'#'"$PATH2"'#' > $CONFIG_TEMP
  14.     mv $CONFIG_TEMP $CONFIG_FILE
  15.     echo "Config file set, starting SimpleScreenRecorder."
  16.     # starting the application
  17.     exec simplescreenrecorder
  18. else
  19.     echo "Error: Can't find config file, please check: $CONFIG_FILE"
  20. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement