1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

B #2238: main.js symlink not recovered after re-building sunstone

This commit is contained in:
Abel Coronado 2018-07-03 16:54:23 +02:00 committed by Ruben S. Montero
parent 20e48034b5
commit e651040137

View File

@ -5,10 +5,11 @@ set -e
#-------------------------------------------------------------------------------
usage() {
echo
echo "Usage: build.sh [-d] [-c] [-h]"
echo "Usage: build.sh [-d] [-c] [-l] [-h]"
echo
echo "-d: install build dependencies (bower, grunt)"
echo "-c: clean build"
echo "-l: preserve main.js"
echo "-h: prints this help"
}
@ -38,16 +39,24 @@ install_patch() {
fi
done
if [ "$DO_LINK" = "yes" ]; then
mv -f dist/main.js ./main.js
fi
grunt --gruntfile ./Gruntfile.js sass
grunt --gruntfile ./Gruntfile.js requirejs
mv -f dist/main.js dist/main-dist.js
if [ "$DO_LINK" = "yes" ]; then
mv ./main.js dist/main.js
fi
}
#-------------------------------------------------------------------------------
PARAMETERS="dch"
PARAMETERS="dlch"
if [ $(getopt --version | tr -d " ") = "--" ]; then
TEMP_OPT=`getopt $PARAMETERS "$@"`
@ -57,6 +66,7 @@ fi
DEPENDENCIES="no"
CLEAN="no"
DO_LINK="no"
eval set -- "$TEMP_OPT"
@ -64,6 +74,7 @@ while true ; do
case "$1" in
-d) DEPENDENCIES="yes" ; shift ;;
-c) CLEAN="yes" ; shift ;;
-l) DO_LINK="yes" ; shift ;;
-h) usage; exit 0;;
--) shift ; break ;;
*) usage; exit 1 ;;