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.
This commit is contained in:
parent
73fb085a41
commit
84006e1e77
|
@ -55,7 +55,7 @@ if sudo mount $ROOT_PARTITION $MOUNT_DIR; then
|
||||||
stat \"\$full\"
|
stat \"\$full\"
|
||||||
if [[ \${STAT[uid]} != \$uid ]] || [[ \${STAT[gid]} != \$gid ]] || [[ \${STAT[perms]} != \$mode ]]; then
|
if [[ \${STAT[uid]} != \$uid ]] || [[ \${STAT[gid]} != \$gid ]] || [[ \${STAT[perms]} != \$mode ]]; then
|
||||||
chown -h \"\$uid:\$gid\" \"\$full\"
|
chown -h \"\$uid:\$gid\" \"\$full\"
|
||||||
chmod -h \"\$mode\" \"\$full\"
|
test ! -h \"\$full\" && chmod \"\$mode\" \"\$full\"
|
||||||
fi
|
fi
|
||||||
done <$BANAN_BUILD_DIR/sysroot-perms.txt
|
done <$BANAN_BUILD_DIR/sysroot-perms.txt
|
||||||
else
|
else
|
||||||
|
@ -63,7 +63,7 @@ if sudo mount $ROOT_PARTITION $MOUNT_DIR; then
|
||||||
full=\"$MOUNT_DIR/\$path\"
|
full=\"$MOUNT_DIR/\$path\"
|
||||||
if [[ \$(stat -c '%u %g %a' \"\$full\") != \"\$uid \$gid \$mode\" ]]; then
|
if [[ \$(stat -c '%u %g %a' \"\$full\") != \"\$uid \$gid \$mode\" ]]; then
|
||||||
chown -h \"\$uid:\$gid\" \"\$full\"
|
chown -h \"\$uid:\$gid\" \"\$full\"
|
||||||
chmod -h \"\$mode\" \"\$full\"
|
test ! -h \"\$full\" && chmod \"\$mode\" \"\$full\"
|
||||||
fi
|
fi
|
||||||
done <$BANAN_BUILD_DIR/sysroot-perms.txt
|
done <$BANAN_BUILD_DIR/sysroot-perms.txt
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue