beta 06.29.1a

This commit is contained in:
Ohio2 2021-06-28 23:33:41 +02:00
parent ac36a8bd1f
commit 33579be33b

13
spkg
View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh #!/usr/bin/env sh
func()
#sPKG via wget #sPKG via wget
# NOTE: sPKG via wget CAN'T RUN WITHOUT MAKE!!! # NOTE: sPKG via wget CAN'T RUN WITHOUT MAKE!!!
# ALNUX might not have MAKE!!! We tried porting it, dependiecies are fucked. # ALNUX might not have MAKE!!! We tried porting it, dependiecies are fucked.
@ -7,10 +8,10 @@ source=git.hippoz.xyz/spkg/repo
beta=false beta=false
case ${1} in case ${1} in
setup) mv ./deps/* /usr/bin/ && cp ./spkg /usr/bin/spkg && chmod +x /usr/bin/git && mkdir /etc/ && mv os-release /etc/ ;; setup) mv ./deps/* /usr/bin/ && cp ./spkg /usr/bin/spkg && chmod +x /usr/bin/git && mkdir /etc/ && mv os-release /etc/ ;;
remove) pushd && cd /usr/src/${2} && make uninstall && popd ;; remove) pushd && for fname in $@ && cd /usr/src/${2} && make uninstall && popd ;;
install) case ${2} in install) case ${2} in
--root-dir=) pushd && mkdir /usr/src/${3} 2>/dev/null && wget $source/${3}/Makefile /usr/src/${3}/Makefile && cd /usr/src/${3} && make prepare && PREFIX=${4} make && make install && cat ${3} > /var/cache/spkg.cache && popd || echo 'Invalid package.' && popd ;; --root-dir=) pushd && for fname in $@ && mkdir ${4}/usr/src/${3} 2>/dev/null && wget $source/${3}/Makefile ${4}/usr/src/${3}/Makefile && cd ${4}/usr/src/${3} && make prepare && make && make install && cat ${3} > ${4}/var/cache/spkg.cache && popd || echo 'Invalid package.' && popd ;;
*) pushd && mkdir /usr/src/${3} 2>/dev/null && wget $source/${3}/Makefile /usr/src/${3}/Makefile && cd /usr/src/${3} && make prepare && make && make install && cat ${3} > /var/cache/spkg.cache && ${3} --version > /var/cache/spkg.cache && popd || echo 'Invalid package.' && popd ;; *) pushd && for fname in $@ && mkdir /usr/src/${3} 2>/dev/null && wget $source/${3}/Makefile /usr/src/${3}/Makefile && cd /usr/src/${3} && make prepare && make && make install && cat ${3} > /var/cache/spkg.cache && ${3} --version > /var/cache/spkg.cache && popd || echo 'Invalid package.' && popd ;;
esac ;; esac ;;
cache) case ${2} in cache) case ${2} in
clean) rm -rf /usr/src/* ;; clean) rm -rf /usr/src/* ;;
@ -21,15 +22,15 @@ case ${1} in
esac ;; esac ;;
database) case ${3} in database) case ${3} in
lookup) case ${4} in lookup) case ${4} in
local) grep ${5} /var/cache/spkg.cache ;; local) grep $@ /var/cache/spkg.cache ;;
query) wget $source/spkg.cache /tmp/spkg/web.spkg.cache && grep ${5} /tmp/spkg/web.spkg.cache && rm /tmp/spkg/cache || mkdir 2>/dev/null /tmp/spkg && wget $source/spkg.cache /tmp/spkg/ && grep ${5} /tmp/spkg/web.spkg.cache && rm /tmp/spkg/cache;; query) wget $source/spkg.cache /tmp/spkg/web.spkg.cache && grep ${5} /tmp/spkg/web.spkg.cache && rm /tmp/spkg/cache || mkdir 2>/dev/null /tmp/spkg && wget $source/spkg.cache /tmp/spkg/ && grep ${5} /tmp/spkg/web.spkg.cache && rm /tmp/spkg/cache;;
esac ;; esac ;;
esac ;; esac ;;
esac ;; esac ;;
update) version1=$(wget $source/spkg.cache /tmp/spkg/web.spkg.cache && grep ${2}) && version2=$(wget $source/spkg.cache /tmp/spkg/web.spkg.cache && grep ${2} /tmp/spkg/web.spkg.cache ) && [ version1 = version2] && echo 'Up to date.' || pushd && mkdir /usr/src/${2} 2>/dev/null && wget $source/${2}/Makefile /usr/src/${2}/Makefile && cd /usr/src/${2} && make prepare && make && make install && cat ${2} > /var/cache/spkg.cache && ${2} --version > /var/cache/spkg.cache && popd ;; update) for fname in $@ && version1=$(wget $source/spkg.cache /tmp/spkg/web.spkg.cache && grep ${2}) && version2=$(wget $source/spkg.cache /tmp/spkg/web.spkg.cache && grep ${2} /tmp/spkg/web.spkg.cache ) && [ version1 = version2] && echo 'Up to date.' || pushd && mkdir /usr/src/${2} 2>/dev/null && wget $source/${2}/Makefile /usr/src/${2}/Makefile && cd /usr/src/${2} && make prepare && make && make install && cat ${2} > /var/cache/spkg.cache && ${2} --version > /var/cache/spkg.cache && popd ;;
--help) echo 'sPKG via WGET, to cache, just type in sudo spkg cache save. --help) echo 'sPKG via WGET, to cache, just type in sudo spkg cache save.
to install, just type in sudo spkg install. to install, just type in sudo spkg install.
to update, just type in sudo spkg update. to update, just type in sudo spkg update.
to setup (IMPORTANT!!!), just type in sudo spkg setup' ;; to setup (IMPORTANT!!!), just type in sudo spkg setup' ;;
--version) echo 'beta 21.06.28.1b' ;; --version) echo 'beta 21.06.29.1a' ;;
esac esac