Skip to content

Instantly share code, notes, and snippets.

@nateroling
Created October 22, 2015 17:55
Show Gist options
  • Save nateroling/967fec40e368fd9292c9 to your computer and use it in GitHub Desktop.
Save nateroling/967fec40e368fd9292c9 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Example:
# > just publish
# Finds and executes scripts/publish or script/publish
# TODO Find and execute grunt/gulp tasks
CMD=''
if [ -x ./scripts/$1 ]; then
CMD=./scripts/$1
elif [ -x ./script/$1 ]; then
CMD=./script/$1
fi
if [ $CMD ]; then
echo $CMD " (enter to run, control-c to cancel)"
read CONTINUE
eval $CMD
else
echo "I don't know how to $1!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment