Skip to content

Commit

Permalink
support setup from packaged version
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it committed Sep 8, 2017
1 parent 495a437 commit 5c1d9b0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

# Setup utility for creating an OmniOS build environment.

mydir=`dirname $_`

ips=https://pkg.omniosce.org
github=https://github.com
role=1
Expand Down Expand Up @@ -166,7 +168,7 @@ install_env()
sed "
s^__WORKINGTREE__^$wd^
s^__BUILDNUM__^$relnum^
" < etc/template.env > $wd/omnios.env
" < $mydir/etc/template.env > $wd/omnios.env
}

install_site()
Expand Down Expand Up @@ -250,7 +252,16 @@ install_env
install_site

echo
if ask "Create symlink as /usr/bin/omni?"; then

if [[ $mydir = */ooce/* ]]; then
cat << EOM
Setup is complete.
Invoke the utility by typing '/opt/ooce/bin/omni'
or add /opt/ooce/bin to your \$PATH
EOM
elif ask "Create symlink as /usr/bin/omni?"; then
[ -h /usr/bin/omni ] && rm -f /usr/bin/omni
ln -s `pwd`/bin/omni /usr/bin/omni
echo
Expand Down

0 comments on commit 5c1d9b0

Please sign in to comment.