This commit is contained in:
Ella-0 2021-02-21 14:19:11 +00:00
commit 5fc4bc88ff
2 changed files with 35 additions and 5 deletions

38
iglu.sh
View file

@ -1,11 +1,34 @@
#!/bin/sh #!/bin/sh
HELP="
-h This help window
--help alias to \`-h\`
-i install
-u uninstall
-l outputs the license
-f lists installed files
-d list dependencies
-iu install update or install upgrade
-ui alias to \`-iu\`
NOT IMPLEMENTED:
-o root"
usage() { usage() {
echo $(basename "$0"): ERROR: "$@" 1>&2 echo usage: $(basename "$0") printf "${HELP}" 1>&2
echo usage: $(basename "$0") '([-i]|[-u]|[-f]|[-l]) [-o root]
[pkg.tar]' 1>&2
exit 1 exit 1
} }
error_usage() {
echo $(basename "$0"): ERROR: "$@" 1>&2
usage
}
tar_fail() { tar_fail() {
echo "Failed to extract tar" echo "Failed to extract tar"
exit 1 exit 1
@ -45,6 +68,9 @@ dep_not_found() {
i= u= l= f= o= d= iu= i= u= l= f= o= d= iu=
# Handle commandline arguments.
case "$1" in case "$1" in
-i) i=1;; -i) i=1;;
-u) u=1;; -u) u=1;;
@ -53,7 +79,11 @@ case "$1" in
-d) d=1;; -d) d=1;;
-iu) iu=1;; -iu) iu=1;;
-ui) iu=1;; -ui) iu=1;;
*) usage "bad argument $i";;
-h) usage;;
--help) usage;;
*) error_usage "bad argument $i";;
esac esac
shift shift

View file

@ -4,7 +4,7 @@ pkgrel=1
ext="dev" ext="dev"
fetch() { fetch() {
curl "https://k1ss.org/wiki/kernel/patches/kernel-no-perl.patch" -o kernel-no-perl.patch curl "https://github.com/kisslinux/website/blob/master/site/dist/kernel-no-perl.patch" -o kernel-no-perl.patch
curl "https://cdn.kernel.org/pub/linux/kernel/v5.x/$pkgname-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz curl "https://cdn.kernel.org/pub/linux/kernel/v5.x/$pkgname-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz
tar -xf $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz
cd $pkgname-$pkgver cd $pkgname-$pkgver