Permalink
Browse files

[enhance] install.sh, install_release.sh: added an option to just uni…

…nstall wrappers
  • Loading branch information...
1 parent 8af3e00 commit 6a0f5360f87460d30f0d493f5ee5843eabf381cc @Aqua-Ye Aqua-Ye committed Sep 10, 2012
Showing with 13 additions and 8 deletions.
  1. +12 −7 tools/utils/install.sh
  2. +1 −1 tools/utils/install_release.sh
@@ -18,12 +18,14 @@ help() {
echo " --prefix <dir> make wrappers for the given installation prefix"
echo " (by default, the value of --dir)"
echo " --quiet be quiet"
- echo " --uninstall remove installed scripts instead"
+ echo " --uninstall remove installed scripts"
+ echo " --uninstall-wrappers remove installed wrapper scripts"
}
INSTALLDIR=$PWD
LINKDIR=""
UNINSTALL=false
+UNINSTALL_WRAPPERS=false
NO_OCAML=false
QUIET=false
@@ -65,6 +67,9 @@ while [ $# -gt 0 ]; do
--uninstall)
UNINSTALL=true
;;
+ --uninstall-wrappers)
+ UNINSTALL_WRAPPERS=true
+ ;;
--no-ocaml)
NO_OCAML=true
;;
@@ -93,7 +98,7 @@ create_wrapper() {
[ $# -eq 0 ]
local wrapper=$INSTALLDIR/bin/$name
- if [ $UNINSTALL = true ]; then
+ if [ $UNINSTALL = true ] || [ $UNINSTALL_WRAPPERS = true ]; then
[ $QUIET = true ] || echo "Removing $wrapper"
rm -f $wrapper
if [ -n "$LINKDIR" ]; then
@@ -166,8 +171,8 @@ create_wrapper $PREFIX/lib/opa/bin/opa-plugin-builder-bin opa-plugin-builder
# creating wrapper script 'opa-plugin-browser'
create_wrapper $PREFIX/lib/opa/bin/opa-plugin-browser-bin opa-plugin-browser
-# if [ $UNINSTALL = true ]; then
-# opa_create=$INSTALLDIR/bin/opa-create
-# [ $QUIET = true ] || echo "Removing $opa_create"
-# rm -f $opa_create
-# fi
+if [ $UNINSTALL = true ]; then
+ opa_create=$INSTALLDIR/bin/opa-create
+ [ $QUIET = true ] || echo "Removing $opa_create"
+ rm -f $opa_create
+fi
@@ -242,7 +242,7 @@ if [ $NODOC = "false" ] && [ -z "$IS_WINDOWS" ]; then
cp -r $OPABOOK/* $INSTALLDIR/share/doc/opa/book
fi
-$SRCDIR/tools/utils/install.sh --uninstall --dir $INSTALLDIR
+$SRCDIR/tools/utils/install.sh --uninstall-wrappers --dir $INSTALLDIR
install -m 0755 -v $SRCDIR/tools/utils/install.sh $INSTALLDIR/share/opa
mkdir -p $INSTALLDIR/share/opa/emacs
install -m 0644 -v $SRCDIR/tools/editors/emacs/{opa-mode.el,opa-js-mode.el,site-start.el} $INSTALLDIR/share/opa/emacs

0 comments on commit 6a0f536

Please sign in to comment.