Renaming package to ShadowArch to follow /wiki/Design_Principles; improved packing; development sync to current state -- massive overhaul
This commit is contained in:
41
UserScripts/worktrack
Normal file
41
UserScripts/worktrack
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
command="$1"
|
||||
option="$2"
|
||||
|
||||
case "$command" in
|
||||
"new")
|
||||
# Start a new project
|
||||
mkdir -p ~/Documents/WorkTrack/"$option"
|
||||
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
|
||||
ls -l ~/Documents/WorkTrack
|
||||
;;
|
||||
"complete")
|
||||
# Hide a project from listing.
|
||||
mv ~/Documents/WorkTrack/"$option" ~/Documents/WorkTrack/\."$option"
|
||||
;;
|
||||
"cd")
|
||||
# enter the directory
|
||||
cd ~/Documents/WorkTrack/"$option"
|
||||
if [ $? -eq 0 ]; then exec /bin/bash; fi
|
||||
;;
|
||||
"purge")
|
||||
# Remove all completed projects
|
||||
rm -Ri ~/Documents/WorkTrack/\.[a-zA-Z1-9]*
|
||||
;;
|
||||
"edit")
|
||||
exec libreoffice --writer ~/Documents/WorkTrack/"$option"/track.doc
|
||||
;;
|
||||
*)
|
||||
echo Usage: $0 '[command]'
|
||||
echo Available commands:
|
||||
egrep '\"\) *$' $0 | cut -f 2 -d '"'
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
exit 0
|
Reference in New Issue
Block a user