Adding test user

This commit is contained in:
John Lyon-Smith
2018-02-28 13:42:02 -08:00
parent eb54ca0b62
commit 5889f7655a
6 changed files with 70 additions and 3 deletions

24
server/ops Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
script_dir=$(dirname $0)
script="${script_dir}/src/bin/$1"
if [[ -z "$1" ]]; then
echo "usage: $(basename $0) <command>"
echo ""
echo "Available scripts are"
ls -1 ${script_dir}/src/bin
exit -1
fi
# For scripts that need config access
export NODE_CONFIG_DIR="${script_dir}/config"
if [[ ! -e "${script}" ]]; then
echo error: Script ${script} does not exist
exit -1
fi
shift
# See https://stackoverflow.com/questions/448407/bash-script-to-receive-and-repass-quoted-parameters
babel-node -- "${script}" "$@"