is anybody reading these
This commit is contained in:
parent
9231a4c60b
commit
be369765f7
1 changed files with 16 additions and 6 deletions
22
spkg
22
spkg
|
@ -1,14 +1,24 @@
|
|||
#!/usr/bin/env sh
|
||||
#sPKG via wget
|
||||
source=mirror
|
||||
#fuck spaghetti code
|
||||
source=git.hippoz.xyz/spkg/repo
|
||||
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 ;;
|
||||
remove) dirstack=$(pwd) && cd /usr/src/$2 && make uninstall && rm ./$2 && popd ;;
|
||||
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 ;;
|
||||
*) 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 ;;
|
||||
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'
|
||||
save) case $3 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 ;;
|
||||
database) case $3 in
|
||||
lookup) case $4 in
|
||||
local) grep $5 /var/cache/spkg.cache ;;
|
||||
query) wget $source/web.spkg.cache /tmp/spkg/ && grep $5 /tmp/spkg/web.spkg.cache && rm /tmp/spkg/cache || mkdir -P /tmp/spkg ;;
|
||||
esac
|
||||
|
||||
esac
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue