Commit 50dec668 authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Make passing of arguments to the sgc scripts possible

parent d0b53ac7
......@@ -37,7 +37,9 @@ function setNodeVersion {
fi
}
if [ "$1" == "shortlist" ]; then
COMMAND=$1
if [ "$COMMAND" == "shortlist" ]; then
taskList="server images css css:sprites css:svg css:abovethefold images:uploaded js:compile js:qa js shortlist releaseExtension lighthouse"
if [ -e sgc-scripts ]
then
......@@ -45,18 +47,19 @@ if [ "$1" == "shortlist" ]; then
else
echo -e ${taskList}
fi
elif [ -e "sgc-core/core/modules/$1.sh" ]; then
elif [ -e "sgc-core/core/modules/$COMMAND.sh" ]; then
setNodeVersion
./sgc-core/core/modules/$1.sh $@
elif [ -e "./sgc-scripts/$1.sh" ]; then
./sgc-core/core/modules/$COMMAND.sh $@
elif [ -e "./sgc-scripts/$COMMAND.sh" ]; then
setNodeVersion
./sgc-scripts/$1.sh
elif [ -e "./sgc-scripts/$1.js" ]; then
shift
./sgc-scripts/$COMMAND.sh $@
elif [ -e "./sgc-scripts/$COMMAND.js" ]; then
setNodeVersion
node ./sgc-scripts/$1.js
elif [ -e "./sgc-core/core/modules/$1.js" ]; then
node ./sgc-scripts/$COMMAND.js
elif [ -e "./sgc-core/core/modules/$COMMAND.js" ]; then
setNodeVersion
node ./sgc-core/core/modules/$1.js $@
node ./sgc-core/core/modules/$COMMAND.js $@
else
setNodeVersion
cd sgc-core
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment