Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
左文建 committed Dec 1, 2018
1 parent 3545835 commit 9c78a7a
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 27 deletions.
7 changes: 7 additions & 0 deletions setup/centos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DST=${HOME}/rigger-ng
PKG=${HOME}/devspace/rigger-ng/src

unlink $DST
ln -s $PKG $DST
cd $DST ;
./setup.sh centos_xcc.py
8 changes: 8 additions & 0 deletions setup/centos_team.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DST=/usr/local/rigger-ng
PKG=${HOME}/devspace/rigger-ng/src
if test -d $DST
sudo rm -rf $DST
fi
sudo cp -r $DST $PKG
cd $DST ;
./setup.sh centos.py
10 changes: 1 addition & 9 deletions setup/mac.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
DST=${HOME}/rigger-ng
PKG=${HOME}/devspace/rigger-ng/src

unlink $DST
ln -s $PKG $DST
cd $DST ;
cd $DST
./setup.sh mac.py
cd /usr/local/bin
sudo unlink rg
sudo ln -s ${DST}/rg rg


echo "Welcome use Rigger-NG! "
echo "eg: rg help"
8 changes: 0 additions & 8 deletions setup/simple.sh

This file was deleted.

8 changes: 8 additions & 0 deletions setup/xcc_team.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DST=/data/x/tools/rigger-ng
PKG=${HOME}/devspace/rigger-ng/src
if test -d $DST
sudo rm -rf $DST
fi
sudo cp -r $DST $PKG
cd $DST ;
./setup.sh xcc.py
1 change: 1 addition & 0 deletions src/core/run_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def load_rgenv():
def set_modul_path() :
root = os.path.dirname(os.path.realpath(__file__))
root = os.path.dirname(root)
sys.path.append("/etc/rigger-ng")
sys.path.append(root)
sys.path.append(os.path.join(root,"extends/res") )
sys.path.append(os.path.join(root,"lib") )
Expand Down
1 change: 0 additions & 1 deletion src/etc/rg_env.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
37 changes: 28 additions & 9 deletions src/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,33 @@ if ! test -e "/usr/bin/python" ; then
echo "rigger-ng need python"
exit 0
fi
RGENV=`basename "$1"`
cd $SHELL_DIR/etc
if test -e $RGENV ; then
if test -L rg_env.py ; then
rm rg_env.py
fi
ln -s $RGENV rg_env.py
ENV_TPL=`basename "$1"`
ETC_DIR="/etc/rigger-ng"
ETC_FILE="$ETC_DIR/rg_env.py"
cd $SHELL_DIR/etc_tpl
if test -f $ETC_FILE ; then
echo "$ETC_FILE exists! "
else
if test -e $ENV_TPL ; then
sudo mkdir -p $ETC_DIR
sudo cp $ENV_TPL $ETC_FILE
echo "rigger-ng setup success!"
else
echo $RGENV not exists;
else
echo $ENV_TPL not exists;
exit -1 ;
fi

fi


cd /usr/local/bin
if test -L /usr/local/bin/rg ; then
sudo rm /usr/local/bin/rg
fi
sudo ln -s ${DST}/rg rg

echo ""
echo "---------------------------------------"
echo "Welcome use Rigger-NG! "
echo "eg: rg help"
echo "---------------------------------------"
1 change: 1 addition & 0 deletions test/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ def setup_env() :
root = os.path.dirname(os.path.realpath(__file__))
root = os.path.dirname(root)
sys.path.append(os.path.join(root,"src") )
sys.path.append("/etc/rigger-ng")
import core.run_env
core.run_env.set_modul_path()
os.environ['PRJ_ROOT'] = root
Expand Down

0 comments on commit 9c78a7a

Please sign in to comment.