Skip to content

Commit

Permalink
Merge pull request #11 from joel-bluedata/usr-local
Browse files Browse the repository at this point in the history
support installation to "user home"
  • Loading branch information
joel-bluedata authored Jan 21, 2022
2 parents 23a077c + f146553 commit 9d499be
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion install
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,15 @@ mkdir -p /var/log/guestconfig
mkdir -p /opt/guestconfig
chmod a+X /opt/guestconfig /var/log/guestconfig

(cd ${THIS_DIR}; python setup.py install --install-scripts /usr/bin)
if [[ "$1" == "--new" ]]
then
scripthome=$(python -c 'import site; print(site.USER_BASE)')/bin
installdir=$(python -c 'import site; print(site.USER_SITE)')
mkdir -p "$installdir"
installarg="--user"
else
scripthome="/usr/bin"
installarg=""
fi

(cd ${THIS_DIR}; python setup.py install "$installarg" --install-scripts="$scripthome")

0 comments on commit 9d499be

Please sign in to comment.