summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-07-30 18:36:34 +0000
committerdavidovski <david@davidovski.xyz>2022-07-30 18:36:34 +0000
commite7b2de40c6d03f3a5b4fb3906ef826ad169a7cb2 (patch)
tree6fbd6b2465552826c740c7efd5c492c865b1bfec
parentd24c110caab48002edb5a3e2c41876e6e0a7a6ed (diff)
sysroot is now included in functions themselvesv1.7.2
-rw-r--r--Makefile2
-rwxr-xr-xscripts/install.sh2
-rw-r--r--src/build.sh2
-rw-r--r--src/install.sh8
-rwxr-xr-xsrc/profile.sh6
-rw-r--r--src/stats.sh2
-rw-r--r--src/util.sh4
-rwxr-xr-xsrc/xi.sh2
8 files changed, 14 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 9ae35fb..a9cb886 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ install-config:
install: build install-config
@./build.shmk install
- ln -sf xipkg ${DESTDIR}${PREFIX}/bin/xi
+ ln -sf xi ${DESTDIR}${PREFIX}/bin/xipkg
clean:
@./build.shmk clean
diff --git a/scripts/install.sh b/scripts/install.sh
index cf07e37..da59cdd 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -1,7 +1,7 @@
#!/bin/sh
default_packages="base linux-libre xipkg dracut grub bash"
-additional_packages="sudo neofetch vim networkmanager"
+additional_packages="doas neofetch vim networkmanager"
default_key="davidovski https://xi.davidovski.xyz/keychain/xi.pub"
XIPKG="/usr/bin/xi"
diff --git a/src/build.sh b/src/build.sh
index 89d2bf3..614924b 100644
--- a/src/build.sh
+++ b/src/build.sh
@@ -49,7 +49,7 @@ get_revision () {
# return the installed revision of the given package
#
get_installed_revision () {
- local infofile=${INSTALLED_DIR}/$1/info
+ local infofile=${SYSROOT}${INSTALLED_DIR}/$1/info
[ -f $infofile ] && {
sed -rn "s/^REVISION=(.*)$/\1/p" $infofile
}
diff --git a/src/install.sh b/src/install.sh
index 4bbacbe..c2505c5 100644
--- a/src/install.sh
+++ b/src/install.sh
@@ -10,7 +10,7 @@ install_package () {
local name="$2"
local info_file="$pkg_file.info"
- local installed_dir="${INSTALLED_DIR}/$name"
+ local installed_dir="${SYSROOT}${INSTALLED_DIR}/$name"
local info="$installed_dir/info"
local files="$installed_dir/files"
local checksum="$installed_dir/checksum"
@@ -90,7 +90,7 @@ install () {
${VERBOSE} && printf "${BLACK}Requested to install: $@\n${RESET}"
if [ "$#" = "0" ]; then
- packages=$(ls ${INSTALLED_DIR})
+ packages=$(ls ${SYSROOT}${INSTALLED_DIR})
fi
local missing=""
@@ -109,8 +109,8 @@ install () {
${VERBOSE} && printf "${BLACK}installing $name from $package \n${RESET}"
install_package $package $name &
- mkdir -p "${INSTALLED_DIR}/$name/"
- filelist="${INSTALLED_DIR}/$name/files"
+ mkdir -p "${SYSROOT}${INSTALLED_DIR}/$name/"
+ filelist="${SYSROOT}${INSTALLED_DIR}/$name/files"
touch $filelist
files_files="$files_files $filelist"
done
diff --git a/src/profile.sh b/src/profile.sh
index c2bda20..165bf0a 100755
--- a/src/profile.sh
+++ b/src/profile.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-. /usr/lib/colors.sh
-. /usr/lib/glyphs.sh
+#include colors.sh
+#include glyphs.sh
export HBAR_COMPLETE="-c ${GREEN}${BG_DEFAULT}"
export HBAR_RED="-c ${BLACK}${BG_RED}"
@@ -17,7 +17,7 @@ export REPOS="$(parseconf -v repos)"
export SOURCES="$(parseconf sources.*)"
export PACKAGES_DIR=$(parseconf -v dir.packages)
-export INSTALLED_DIR=${SYSROOT}$(parseconf -v dir.installed)
+export INSTALLED_DIR=$(parseconf -v dir.installed)
export KEYCHAIN_DIR=$(parseconf -v dir.keychain)
export CACHE_DIR=$(parseconf -v dir.cache)
diff --git a/src/stats.sh b/src/stats.sh
index 8c2c1be..903bfde 100644
--- a/src/stats.sh
+++ b/src/stats.sh
@@ -9,7 +9,7 @@ show_xipkg_stats () {
local installed=0
for package in $(list); do
total=$((total+1))
- [ -d ${INSTALLED_DIR}/${package} ] &&
+ [ -d ${SYSROOT}${INSTALLED_DIR}/${package} ] &&
installed=$((installed+1))
done
diff --git a/src/util.sh b/src/util.sh
index 2b7044c..f92e4e3 100644
--- a/src/util.sh
+++ b/src/util.sh
@@ -86,14 +86,14 @@ prompt_question () {
# return if a package is present on the system or not
#
is_installed() {
- [ -f "${INSTALLED_DIR}/$1/checksum" ]
+ [ -f "${SYSROOT}${INSTALLED_DIR}/$1/checksum" ]
}
# get the installed checksum of a package ($1)
#
get_installed_version () {
local name=$1
- local file="${INSTALLED_DIR}/$name/checksum"
+ local file="${SYSROOT}${INSTALLED_DIR}/$name/checksum"
[ -f $file ] &&
cat $file
}
diff --git a/src/xi.sh b/src/xi.sh
index 93d4c36..2f50fa5 100755
--- a/src/xi.sh
+++ b/src/xi.sh
@@ -225,7 +225,7 @@ else
;;
"verify")
shift
- [ -z "$*" ] && set -- $(ls ${INSTALLED_DIR})
+ [ -z "$*" ] && set -- $(ls ${SYSROOT}${INSTALLED_DIR})
while [ ! -z "$*" ]; do
validate_files $1 || {
${QUIET} && printf "%s\n" $1 || printf "${LIGHT_RED}Failed to verify $1\n"