Skip to content

Instantly share code, notes, and snippets.

@Willshaw Willshaw/example.sh
Created Jan 4, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.