Skip to content

Commit

Permalink
B OpenNebula#2238: main.js symlink not recovered after re-building su…
Browse files Browse the repository at this point in the history
…nstone
  • Loading branch information
Abel Coronado committed Jul 3, 2018
1 parent 20e4803 commit 72fd770
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/sunstone/public/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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: recreate links to main.js"
echo "-h: prints this help"
}

Expand Down Expand Up @@ -38,16 +39,24 @@ install_patch() {
fi
done

if [ "$DO_LINK" = "yes" ]; then
mv -f dist/main.js dist/main.js-var
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 dist/main.js-var dist/main.js
fi

}
#-------------------------------------------------------------------------------

PARAMETERS="dch"
PARAMETERS="dlch"

if [ $(getopt --version | tr -d " ") = "--" ]; then
TEMP_OPT=`getopt $PARAMETERS "$@"`
Expand All @@ -57,13 +66,15 @@ fi

DEPENDENCIES="no"
CLEAN="no"
DO_LINK="no"

eval set -- "$TEMP_OPT"

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 ;;
Expand Down

1 comment on commit 72fd770

@atodorov-storpool
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
Please take a look at OpenNebula#2238 (comment)

Please sign in to comment.