-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmanage.sh
More file actions
executable file
·39 lines (31 loc) · 839 Bytes
/
Copy pathmanage.sh
File metadata and controls
executable file
·39 lines (31 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
##
# This script makes it easier to execute the management commands for Stackdump.
#
# Run without parameters to get a list of commands.
##
SCRIPT_DIR=`dirname $0`
COMMANDS_DIR=$SCRIPT_DIR/python/src/stackdump/commands
if [ -z "$1" ]
then
echo "Stackdump management commands:"
commands=`ls "$COMMANDS_DIR"`
for c in $commands
do
command=`echo $c | cut -d . -f1`
echo -e "\t$command"
done
echo
echo "Execute $0 command to run it, e.g. $0 manage_sites"
else
# look for command
command="$COMMANDS_DIR/$1.py"
if [ ! -e $command ]
then
echo "The command $1 does not exist. Run without any parameters to list commands."
exit 1
fi
# shift off the command name so we don't pass it on
shift
$SCRIPT_DIR/start_python.sh $command "$@"
fi