change in build system

This commit is contained in:
Ohio2 2021-01-29 09:48:24 +01:00
parent 0dd521461a
commit 39b7a2a7fc

6
spkg
View file

@ -5,10 +5,10 @@
source=git.hippoz.xyz/spkg/repo source=git.hippoz.xyz/spkg/repo
case $1 in case $1 in
remove) dirstack=$(pwd) && cd /usr/src/$2 && make uninstall && rm ./$2 && popd ;; remove) dirstack=$(pwd) && cd /usr/src/$2 && make uninstall && popd ;;
install) case $2 in install) case $2 in
--root-dir=) dirstack=$(pwd) && wget $source/$2 /usr/src/$2 && cd /usr/src && untar -x --zstd $2 && cd $2 && make && make install && cat $2 > /var/cache/spkg.cache && && rm ./$2.tar.zst && popd || echo 'Invalid package.' && popd ;; --root-dir=) dirstack=$(pwd) mkdir -P /usr/src/$2 && wget $source/$2/Makefile /usr/src/$2/Makefile && cd /usr/src/$2 && make prepare && make && make install && cat $2 > /var/cache/spkg.cache && popd || echo 'Invalid package.' && popd ;;
*) dirstack=$(pwd) && wget $source/$2 /usr/src/$2 && cd /usr/src && untar -x --zstd $2 && cd $2 && make && make install && cat $2 > /var/cache/spkg.cache && && rm ./$2.tar.zst && popd || echo 'Invalid package.' && popd ;; *) dirstack=$(pwd) && mkdir -P /usr/src/$2 && wget $source/$2/Makefile /usr/src/$2/Makefile && cd /usr/src/$2 && make prepare && make && make install && cat $2 > /var/cache/spkg.cache && popd || echo 'Invalid package.' && popd ;;
cache) case $2 in cache) case $2 in
rm) rm -rf /usr/src/* ;; rm) rm -rf /usr/src/* ;;
clean) rm -rf /usr/src/$3 ;; clean) rm -rf /usr/src/$3 ;;