Created
January 4, 2018 17:32
-
-
Save Willshaw/fb448dfbc442e372d67f961ea9cfea8c to your computer and use it in GitHub Desktop.
simple start to a bash script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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