diff --git a/bin/hours-convert.sh b/bin/hours-convert.sh new file mode 100755 index 0000000..ee59fe6 --- /dev/null +++ b/bin/hours-convert.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -e + +read -p "Did you remember to check the project mapping? $TOGGL_PROJECT_INFO (Y/n): " check_project + +if [[ "$check_project" ~= ^[^Yy]$ ]]; then + echo "Check and then run this script again" + exit 1 +fi + +CMD="time convert" +OPTS="--input $TOGGL_DATA --output $HARVEST_DATA" + +exec compiler-admin $CMD $OPTS diff --git a/bin/new-user.sh b/bin/new-user.sh new file mode 100755 index 0000000..c05b8b5 --- /dev/null +++ b/bin/new-user.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -e + +if [ $# -lt 3 ]; then + echo "Usage: $0 []" + exit 1 +fi + +USERNAME=$1 +FIRST=$2 +LAST=$3 +NOTIFY=${4:-} + +CMD="user create" +OPTS="$USERNAME firstname $FIRST lastname $LAST" + +if [[ "$NOTIFY" ]]; then + OPTS="--notify $NOTIFY $OPTS" +fi + +exec compiler-admin $CMD $OPTS