Skip to content

Instantly share code, notes, and snippets.

@Willshaw
Created January 4, 2018 17:32
Show Gist options
  • Save Willshaw/fb448dfbc442e372d67f961ea9cfea8c to your computer and use it in GitHub Desktop.
Save Willshaw/fb448dfbc442e372d67f961ea9cfea8c to your computer and use it in GitHub Desktop.
simple start to a bash script
#!/bin/bash
################################
# to use the tracker:
# call the track script, using the full path to the script
# and also give it an action string, and a script string
#
# $REPO_PATH"bin/track.sh" "completed thing" $REPO_PATH"task_one"
#
# /path/to/script/bin/track.sh "action that happened" "script/that/is/doing/things"
################################
action=$1
script=$2
if [[ -z "$action" ]]
then
echo 'No action supplied'
exit
fi
# if group is empty try using the user as group
if [[ -z "$script" ]]
then
echo 'No script supplied'
exit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment