Advertisement
j_melis

Untitled

May 5th, 2011
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.91 KB | None | 0 0
  1. diff --git a/install.sh b/install.sh
  2. index c3fce7b..a8ddfc0 100755
  3. --- a/install.sh
  4. +++ b/install.sh
  5. @@ -25,22 +25,23 @@
  6.  
  7.  DIR=`dirname $0`
  8.  
  9. +
  10.  if [ -n "$ONE_LOCATION" ]; then
  11.      BIN_LOCATION="$ONE_LOCATION/bin"
  12.      LIB_LOCATION="$ONE_LOCATION/lib"
  13. +    ADDON_DIR=$HOME
  14.  else
  15.      BIN_LOCATION="/usr/bin"
  16.      LIB_LOCATION="/usr/lib/one"
  17. +    ADDON_DIR=$(getent passwd|grep ^${ONE_USER:=oneadmin}:|cut -d: -f6)
  18.  fi
  19.  
  20.  cp $DIR/oneacct.rb $DESTDIR$LIB_LOCATION/ruby/oneacct.rb || error=true
  21.  cp $DIR/oneacct $DESTDIR$BIN_LOCATION/oneacct || error=true
  22.  
  23. -if [ ! -e $HOME/.one/addons ]; then
  24. -    mkdir $HOME/.one/addons || error
  25. -fi
  26. +mkdir -p $ADDON_DIR/.one/addons/accounting || error
  27.  
  28. -echo "2.2.0" > $HOME/.one/addons/accounting || error
  29. +echo "2.2.0" > $ADDON_DIR/.one/addons/accounting/version || error
  30.  
  31.  if [ -n "$error" ]; then
  32.      echo "There was a problem with the installation"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement