diff --git a/Shared/Makefile b/Shared/Makefile index f30536e..cf51c56 100644 --- a/Shared/Makefile +++ b/Shared/Makefile @@ -1,4 +1,4 @@ -LIST=bell bigorlittle compare-directories compress-all diff-args expand-all logged-shell standardize-folder whatismyip new-irssi-config replicate-ssh-profiles +LIST=bell bigorlittle compare-directories compress-all diff-args expand-all logged-shell standardize-folder whatismyip new-irssi-config replicate-ssh-profiles worktrack LOCATION=/usr/local/bin INSTALLER != curl -s https://aninix.net/foundation/installer-test.bash | /bin/bash PERMISSION=0755 diff --git a/Shared/worktrack b/Shared/worktrack index 5382dc4..bfbf78f 100644 --- a/Shared/worktrack +++ b/Shared/worktrack @@ -3,23 +3,13 @@ command="$1" option="$2" -# Sanity checks -if [ ! -x "$(which libreoffice)" ]; then - echo Needs libreoffice. - exit 1; -fi -if [ ! -f /opt/worktrack/template.odt ]; then - echo Needs template document in /opt/worktrack/template.odt - exit 1; -fi - case "$command" in "new") # Start a new project mkdir -p ~/Documents/WorkTrack/"$option" - cp /opt/worktrack/template.odt ~/Documents/WorkTrack/"$option"/track.odt - chmod u+w ~/Documents/WorkTrack/"$option"/track.odt - exec libreoffice --writer ~/Documents/WorkTrack/"$option"/track.odt + cp /opt/worktrack/template.doc ~/Documents/WorkTrack/"$option"/track.doc + chmod u+w ~/Documents/WorkTrack/"$option"/track.doc + exec libreoffice --writer ~/Documents/WorkTrack/"$option"/track.doc ;; "list") # Show available projects @@ -39,16 +29,7 @@ case "$command" in rm -Ri ~/Documents/WorkTrack/\.[a-zA-Z1-9]* ;; "edit") - exec libreoffice --writer ~/Documents/WorkTrack/"$option"/track.odt - ;; - "checkperm") - if [ `whoami` != "root" ]; then - echo "Need to be root." - exit 1; - fi - chown root: /opt/worktrack/template.odt /usr/local/bin/worktrack - chmod 0755 /usr/local/bin/worktrack - chmod 0644 /opt/worktrack/template.odt + exec libreoffice --writer ~/Documents/WorkTrack/"$option"/track.doc ;; *) echo Usage: $0 '[command]'