diff options
| author | ruki <[email protected]> | 2020-10-29 00:22:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-10-29 00:22:20 +0800 |
| commit | e5c70421977cdcd866ace7ff8e0884be04a29880 (patch) | |
| tree | bcc229a8b43d9087531ac880994b8c8f3600239c /scripts | |
| parent | d4d0a9196b05fca232b17f2a567256fe4a4c275d (diff) | |
add xrepo.sh
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/rpmbuild/SPECS/xmake.spec | 5 | ||||
| -rwxr-xr-x | scripts/xrepo.sh | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/scripts/rpmbuild/SPECS/xmake.spec b/scripts/rpmbuild/SPECS/xmake.spec index 2dd6d327b..4ed1bb8df 100644 --- a/scripts/rpmbuild/SPECS/xmake.spec +++ b/scripts/rpmbuild/SPECS/xmake.spec @@ -1,4 +1,4 @@ -%define xmake_revision f181def21a641c64962520745dd69d31c14d8f8f +%define xmake_revision d4d0a9196b05fca232b17f2a567256fe4a4c275d %define tbox_revision f4970bcd0fcc05b09742452a4b3b3d2d1055569d %define sv_revision 9a3cf7c8e589de4f70378824329882c4a047fffc %define lua_cjson_revision 515bab6d6d80b164b94db73af69609ea02f3a798 @@ -71,8 +71,7 @@ cp -p core/src/demo/demo.b %{buildroot}%{_bindir}/%{name} chmod 755 %{buildroot}%{_bindir}/%{name} cp -p README.md %{buildroot}%{_datadir} cp -p LICENSE.md %{buildroot}%{_datadir} -echo '#!/usr/bin/env sh' > %{buildroot}%{_bindir}/xrepo -echo "%{buildroot}%{_bindir}/%{name}"' lua private.xrepo "$$@"' >> %{buildroot}%{_bindir}/xrepo +cp -p scripts/xrepo.sh %{buildroot}%{_bindir}/xrepo chmod 777 %{buildroot}%{_bindir}/xrepo %check diff --git a/scripts/xrepo.sh b/scripts/xrepo.sh index 2997cf59e..aa9ca3da3 100755 --- a/scripts/xrepo.sh +++ b/scripts/xrepo.sh @@ -1,2 +1,9 @@ #!/usr/bin/env sh -xmake lua private.xrepo "$@" +SCRIPT=$(readlink -f "$0") +BASEDIR=$(dirname "$SCRIPT") +echo $BASEDIR +if [ -f "$BASEDIR/xmake" ]; then + $BASEDIR/xmake lua private.xrepo "$@" +else + xmake lua private.xrepo "$@" +fi |
