init
This commit is contained in:
commit
9231a4c60b
1 changed files with 14 additions and 0 deletions
14
spkg
Normal file
14
spkg
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env sh
|
||||
#sPKG via wget
|
||||
source=mirror
|
||||
case $1 in
|
||||
remove) dirstack=$(pwd) && cd /usr/src/$2 && make uninstall ;;
|
||||
install) dirstack=$(pwd) && wget $source/$2.tar.zst /usr/src/$2.tar.zst && rm ./$2.tar.zst && cd /usr/src && untar -x --zstd $2 && cd $2 && make && make install && cat $2 > /var/cache/spkg.cache && popd || echo 'Invalid package.' && popd ;;
|
||||
cache) case $2 in
|
||||
rm) rm -rf /usr/src/* ;;
|
||||
clean) rm -rf /usr/src/$3 ;;
|
||||
save) case $4 in
|
||||
to) cp /usr/src/ $4
|
||||
*) cp /usr/src/ /etc/spkg/cache || mkdir -P /etc/spkg && mkdir -P /etc/spkg/cache && echo 'Made a caching directory, rerun:' && echo 'spkg cache'
|
||||
esac ;;
|
||||
esac
|
Loading…
Reference in a new issue