summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-10-23 23:22:40 +0800
committerruki <[email protected]>2020-10-23 23:22:40 +0800
commit59abb0aad7f4a123bc6cc9ae7e1ac4d4b7f73e92 (patch)
tree22997bd3b22b84c549ce8653ef69f3ed9bed7a44
parent2bd85f7814e6aa5d23f5e2218c03290d10921dee (diff)
install xrepo
-rw-r--r--makefile10
-rwxr-xr-xscripts/srcenv.bat2
-rwxr-xr-xscripts/srcenv.profile1
-rwxr-xr-xscripts/xrepo.bat1
4 files changed, 13 insertions, 1 deletions
diff --git a/makefile b/makefile
index 5e7c1206c..a8c7c9f59 100644
--- a/makefile
+++ b/makefile
@@ -85,6 +85,12 @@ xmake_core_install :=$(destdir)/bin/xmake.exe
else
xmake_core_install :=$(destdir)/bin/xmake
endif
+ifdef iswin
+xrepo_name :=xrepo.bat
+else
+xrepo_name :=xrepo
+endif
+xrepo_bin_install :=$(destdir)/bin/$(xrepo_name)
build:
@echo compiling xmake-core ...
@@ -107,6 +113,9 @@ install:
@# install the xmake core file
@cp $(xmake_core) $(xmake_core_install)
@chmod 777 $(xmake_core_install)
+ @# install the xrepo bin file
+ @cp ./scripts/$(xrepo_name) $(xrepo_bin_install)
+ @chmod 777 $(xrepo_bin_install)
@# remove xmake.out
@if [ -f "$(TMP_DIR)/xmake.out" ]; then rm $(TMP_DIR)/xmake.out; fi
@# ok
@@ -116,6 +125,7 @@ uninstall:
@echo uninstalling from $(destdir) ...
@if [ -d $(xmake_dir_install) ]; then rm -rf $(xmake_dir_install); fi
@if [ -f $(xmake_core_install) ]; then rm $(xmake_core_install); fi
+ @if [ -f $(xrepo_bin_install) ]; then rm $(xrepo_bin_install); fi
@echo ok!
test:
diff --git a/scripts/srcenv.bat b/scripts/srcenv.bat
index 974c640b9..661e8e134 100755
--- a/scripts/srcenv.bat
+++ b/scripts/srcenv.bat
@@ -1,4 +1,4 @@
@echo off
-set PATH=%cd%\..\core\build;%PATH%
+set PATH=%cd%\..\core\build;%cd%;%PATH%
set XMAKE_PROGRAM_DIR=%cd%\..\xmake
start cmd /k cd ..
diff --git a/scripts/srcenv.profile b/scripts/srcenv.profile
index 5e69b5540..1bbc4d762 100755
--- a/scripts/srcenv.profile
+++ b/scripts/srcenv.profile
@@ -5,6 +5,7 @@ if [ -f `pwd`/core/build/xmake ]; then
else
alias xmake=`pwd`/core/src/demo/demo.b
fi
+alias xrepo=`pwd`/scripts/xrepo
xmake --version
xmake l xmake.programdir
xmake l xmake.programfile
diff --git a/scripts/xrepo.bat b/scripts/xrepo.bat
index ec8fb8da5..ff95b722a 100755
--- a/scripts/xrepo.bat
+++ b/scripts/xrepo.bat
@@ -1 +1,2 @@
+@echo off
xmake lua private.xrepo %*