Compare commits
2 commits
2497f084c6
...
9f617d1280
Author | SHA1 | Date | |
---|---|---|---|
|
9f617d1280 | ||
|
0e5c0de66a |
1 changed files with 13 additions and 9 deletions
20
spkg
20
spkg
|
@ -1,11 +1,12 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
source="https://git.hippoz.xyz/spkg/repo"
|
source="https://git.hippoz.xyz/down/repo"
|
||||||
tmpdir="/tmp"
|
tmpdir="/tmp"
|
||||||
setup() {
|
setup() {
|
||||||
cp ./spkg /usr/bin/spkg
|
prefix=$1
|
||||||
chmod +x /usr/bin/spkg
|
cp ./spkg "${prefix}"/usr/bin/spkg
|
||||||
mkdir /etc/
|
chmod +x "${perfix}"/usr/bin/spkg
|
||||||
mv os-release /etc/
|
mkdir "${prefix}"/etc/
|
||||||
|
mv os-release "${prefix}"/etc/
|
||||||
}
|
}
|
||||||
removepkg() {
|
removepkg() {
|
||||||
pkgname=$1
|
pkgname=$1
|
||||||
|
@ -63,7 +64,10 @@ version() {
|
||||||
}
|
}
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
setup)
|
setup)
|
||||||
setup ;;
|
case "${2}" in
|
||||||
|
--root-dir) setup "${3}" ;;
|
||||||
|
*) setup "/" ;;
|
||||||
|
esac ;;
|
||||||
remove)
|
remove)
|
||||||
removepkg "${2}" ;;
|
removepkg "${2}" ;;
|
||||||
install)
|
install)
|
||||||
|
@ -90,10 +94,10 @@ case "${1}" in
|
||||||
query)
|
query)
|
||||||
dbquery "${5}" ;;
|
dbquery "${5}" ;;
|
||||||
esac;;
|
esac;;
|
||||||
list)
|
|
||||||
dblist ;;
|
|
||||||
esac ;;
|
esac ;;
|
||||||
esac ;;
|
esac ;;
|
||||||
|
list)
|
||||||
|
dblist ;;
|
||||||
update)
|
update)
|
||||||
update "${2}" ;;
|
update "${2}" ;;
|
||||||
--help)
|
--help)
|
||||||
|
|
Loading…
Reference in a new issue