Skip to content

Commit

Permalink
B #2238: main.js symlink not recovered after re-building sunstone
Browse files Browse the repository at this point in the history
  • Loading branch information
Abel Coronado authored and Ruben S. Montero committed Jul 3, 2018
1 parent 20e4803 commit e651040
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: preserve 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 ./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 "$@"`
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

0 comments on commit e651040

Please sign in to comment.