From bc4902d4c702d9beac47e975dd962851a59dace5 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 9 Apr 2022 17:53:55 +0100 Subject: fixed broken permisisons for bootstrap --- src/bootstrap.sh | 9 +++++++++ src/query.sh | 2 +- src/remove.sh | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/bootstrap.sh b/src/bootstrap.sh index 28d5718..02d8434 100644 --- a/src/bootstrap.sh +++ b/src/bootstrap.sh @@ -23,6 +23,15 @@ create_directories () { ln -s usr/lib ${SYSROOT}/usr/lib64 ln -s usr ${SYSROOT}/usr/local + chmod 0755 ${SYSROOT}/dev + chmod 1777 ${SYSROOT}/tmp + chmod 0555 ${SYSROOT}/sys + chmod 0555 ${SYSROOT}/proc + chmod 0755 ${SYSROOT}/run + chmod 0755 ${SYSROOT}/usr + chmod 0750 ${SYSROOT}/root + chmod 0755 ${SYSROOT}/usr/bin + chmod 0755 ${SYSROOT}/usr/lib } import_keys () { diff --git a/src/query.sh b/src/query.sh index 8ae9588..dc3846c 100644 --- a/src/query.sh +++ b/src/query.sh @@ -29,7 +29,7 @@ file_info () { [ ! -f ${SYSROOT}$file ] && file=$(realpath $file) for pkg in $(list_installed); do for list in ${INSTALLED_DIR}/$pkg/files; do - grep -q $file $list && + grep -q ^${file}$ $list && printf "${LIGHT_BLUE}%s${BLUE} belongs to ${LIGHT_BLUE}%s${RESET}\n" $file $pkg done done diff --git a/src/remove.sh b/src/remove.sh index 7bbb889..fcff458 100644 --- a/src/remove.sh +++ b/src/remove.sh @@ -4,6 +4,7 @@ remove () { local packages=$@ local to_remove="${CACHE_DIR}/toremove" + [ -d ${CACHE_DIR} ] || mkdir -p ${CACHE_DIR} [ -f $to_remove ] && rm $to_remove touch $to_remove local real="" -- cgit v1.2.1