summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-02-17 23:06:38 +0800
committerruki <[email protected]>2020-02-17 12:39:51 +0800
commit077ff4050e3e60cb9c0d18a563a3c3ab76d4f1a1 (patch)
treee6ff5735d349bc15a28a6af37ffd5b10be207b1d
parent97a7a128fa52dfbf872ff10a0ba17d2ffc0c0545 (diff)
remove install scripts
-rwxr-xr-xinstall129
1 files changed, 0 insertions, 129 deletions
diff --git a/install b/install
deleted file mode 100755
index bbd2c1293..000000000
--- a/install
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/bash
-
-# is debug?
-debug=n
-verbose=
-
-#debug=y
-#verbose=-v
-
-# prefix
-if [[ "$PATH" =~ "/usr/local/bin" ]]; then
- prefix=/usr/local
-else
- prefix=/usr
-fi
-if [ $1 ]; then
- prefix=$1
-fi
-echo installing to $prefix ...
-
-# probe plat
-uname=`uname`
-if [ $uname = "MSVC" ]; then
- plat=windows
-elif [ $uname = "Darwin" ] || [ `uname | egrep -i darwin` ]; then
- plat=macosx
-elif [ $uname = "Linux" ] || [ `uname | egrep -i linux` ]; then
- plat=linux
-elif [ `uname | egrep -i msys` ]; then
- plat=windows
-elif [ `uname | egrep -i cygwin` ]; then
- plat=windows
-else
- plat=linux
-fi
-echo plat: $plat
-
-# probe arch
-arch=i386
-if [ $plat = "linux" ] || [ $plat = "macosx" ]; then
- if [ `getconf LONG_BIT` = "64" ]; then
- arch=x86_64
- fi
-fi
-echo arch: $arch
-
-# compile xmake-core
-echo compiling xmake-core ...
-cd ./core
-if [ -f .config.mak ]; then
- rm .config.mak
-fi
-make f DEBUG=$debug
-if [ $? -ne 0 ]; then
- exit;
-fi
-make c
-make
-if [ $? -ne 0 ]; then
- make o
- exit;
-fi
-make i
-cd ..
-
-# create the xmake install directory
-xmake_dir_install=$prefix/share/xmake
-if [ -d $xmake_dir_install ]; then
- rm -rf $xmake_dir_install
-fi
-if [ ! -d $xmake_dir_install ]; then
- mkdir -p $xmake_dir_install
-fi
-if [ $? -ne 0 ]; then
- echo "create $xmake_dir_install failed!"
- exit;
-fi
-
-# install the xmake core file
-xmake_core=./core/bin/demo.pkg/bin/$plat/$arch/demo.b
-xmake_core_install=$xmake_dir_install/xmake
-cp $xmake_core $xmake_core_install
-chmod 777 $xmake_core_install
-if [ $? -ne 0 ]; then
- echo "install xmake core failed!"
- exit;
-fi
-
-# install the xmake directory
-cp -r ./xmake/* $xmake_dir_install/
-if [ $? -ne 0 ]; then
- echo "install xmake directory failed!"
- exit;
-fi
-
-# make the xmake loader
-xmake_loader=/tmp/xmake_loader
-echo "#!/bin/bash" > $xmake_loader
-echo "export XMAKE_PROGRAM_DIR=$xmake_dir_install" >> $xmake_loader
-echo "$xmake_core_install $verbose \"\$@\"" >> $xmake_loader
-if [ $? -ne 0 ]; then
- echo "make xmake loader failed!"
- exit;
-fi
-
-# install the xmake loader
-xmake_loader_install=$prefix/bin/xmake
-if [ ! -d $prefix/bin ]; then
- mkdir -p $prefix/bin
-fi
-mv $xmake_loader $xmake_loader_install
-chmod 777 $xmake_loader_install
-if [ $? -ne 0 ]; then
- echo "install xmake loader failed!"
- exit;
-fi
-
-# tip
-if [[ ! "$PATH" =~ "$prefix/bin" ]]; then
- echo 'please export PATH=$PATH:'"$prefix/bin"
-fi
-
-# remove xmake.out
-if [[ -f "/tmp/xmake.out" ]]; then
- rm /tmp/xmake.out
-fi
-
-# ok
-echo ok!