summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-06 21:19:39 +0000
committerdavidovski <david@davidovski.xyz>2022-06-06 21:19:39 +0000
commit9e7e6c466e0dab3a4bf3729fd97428dc2657746e (patch)
treeccaa4790edce068e1874f93a1b9fd069fae61202
parentdd8004ccbf58b546f48205d2878d9101bbfcaadc (diff)
fixed install scriptv1.5.6
-rwxr-xr-xscripts/install.sh5
-rwxr-xr-xsrc/get.sh7
-rw-r--r--src/remove.sh4
-rwxr-xr-xsrc/xi.sh3
4 files changed, 10 insertions, 9 deletions
diff --git a/scripts/install.sh b/scripts/install.sh
index 0db895e..cf07e37 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-default_packages="base linux xipkg dracut grub bash"
+default_packages="base linux-libre xipkg dracut grub bash"
additional_packages="sudo neofetch vim networkmanager"
default_key="davidovski https://xi.davidovski.xyz/keychain/xi.pub"
@@ -30,7 +30,8 @@ echo "Please make sure that you have correctly formatted any partitions and moun
}
$XIPKG $XIFLAGS sync
-$XIPKG $XIFLAGS -r $SYSROOT bootstrap $default_packages
+$XIPKG $XIFLAGS -r $SYSROOT bootstrap
+$XIPKG $XIFLAGS -r $SYSROOT install $default_packages
$XIPKG $XIFLAGS -r $SYSROOT keyimport $default_key
configuring_users () {
diff --git a/src/get.sh b/src/get.sh
index 4a15bd7..24e397c 100755
--- a/src/get.sh
+++ b/src/get.sh
@@ -50,7 +50,7 @@ resolve_deps () {
${QUIET} || hbar -T "${CHECKMARK} resolving dependencies" $i $((i + $#))
done
- ${QUIET} || hbar -t ${HBAR_COMPLETE} -T "${CHECKMARK} resolved dependencies" $i $((i + $#))
+ ${QUIET} || hbar -t ${HBAR_COMPLETE} -T "${CHECKMARK} resolved dependencies" $i $((i + $#))
echo ${deps} > $out
}
@@ -78,9 +78,8 @@ get_installed_version () {
cat $file
}
-# bad implementation
package_exists () {
- [ "$(find ${PACKAGES_DIR} -mindepth 1 -name "$1" | wc -l)" != "0" ]
+ [ -f "${PACKAGES_DIR}/$1" ]
}
download_package () {
@@ -161,7 +160,7 @@ get () {
[ "$#" = "0" ] && return 0
$DO_SYNC && sync
-
+
touch $out
resolve_deps $out $@
diff --git a/src/remove.sh b/src/remove.sh
index 56b6a42..ae5b58a 100644
--- a/src/remove.sh
+++ b/src/remove.sh
@@ -20,13 +20,13 @@ remove () {
echo $package_dir >> $to_remove
real="$real $package"
else
- >&2 printf "${RED}Package ${LIGHT_RED}$package${RED} is not installed"
+ printf "${RED}Package ${LIGHT_RED}$package${RED} is not installed\n" > /dev/stderr
fi
done
local total=$(cat $to_remove | wc -l)
- ${QUIET} || printf "${LIGHT_RED}The following packages will be removed from the system:\n\t${RED}%s\n" $real
+ ${QUIET} || printf "${LIGHT_RED}The following packages will be removed from the system:\n\t${RED}$real\n"
${QUIET} || printf "${LIGHT_RED}Files to remove: ${RED}%s\n" $total
${VERBOSE} && cat $to_remove
diff --git a/src/xi.sh b/src/xi.sh
index 000eba5..92222f9 100755
--- a/src/xi.sh
+++ b/src/xi.sh
@@ -187,7 +187,8 @@ else
"reinstall")
shift
checkroot
- reinstall $@
+ $0 remove $@
+ $0 install $@
;;
"files")
shift