From 84006e1e7793271a0cb8bcbc8e61b342e6fc8293 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 2 Oct 2025 17:05:20 +0300 Subject: [PATCH] BuildSystem: Don't set symlink mode Only call chmod if the file is not a symlink. Older versions of chmod (shipped with ubuntu) don't support the -h flag. --- script/image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/image.sh b/script/image.sh index d8cd8867..8bf8c4b4 100755 --- a/script/image.sh +++ b/script/image.sh @@ -55,7 +55,7 @@ if sudo mount $ROOT_PARTITION $MOUNT_DIR; then stat \"\$full\" if [[ \${STAT[uid]} != \$uid ]] || [[ \${STAT[gid]} != \$gid ]] || [[ \${STAT[perms]} != \$mode ]]; then chown -h \"\$uid:\$gid\" \"\$full\" - chmod -h \"\$mode\" \"\$full\" + test ! -h \"\$full\" && chmod \"\$mode\" \"\$full\" fi done <$BANAN_BUILD_DIR/sysroot-perms.txt else @@ -63,7 +63,7 @@ if sudo mount $ROOT_PARTITION $MOUNT_DIR; then full=\"$MOUNT_DIR/\$path\" if [[ \$(stat -c '%u %g %a' \"\$full\") != \"\$uid \$gid \$mode\" ]]; then chown -h \"\$uid:\$gid\" \"\$full\" - chmod -h \"\$mode\" \"\$full\" + test ! -h \"\$full\" && chmod \"\$mode\" \"\$full\" fi done <$BANAN_BUILD_DIR/sysroot-perms.txt fi