mirror of
https://github.com/outbackdingo/scratchpkg.git
synced 2026-03-20 04:48:31 +00:00
fix mkdirs
This commit is contained in:
27
scratch
27
scratch
@@ -477,21 +477,22 @@ post_triggers() {
|
||||
case "$dir" in
|
||||
""|\#*) continue ;;
|
||||
esac
|
||||
mkdir -p "$dir"
|
||||
if [ "$uid" != '-' ]; then
|
||||
getent passwd $uid >/dev/null
|
||||
if [[ "$?" = 0 ]]; then
|
||||
chown "$uid" "$dir"
|
||||
if [ -e "$dir" ]; then
|
||||
if [ "$uid" != '-' ]; then
|
||||
getent passwd $uid >/dev/null
|
||||
if [[ "$?" = 0 ]]; then
|
||||
chown "$uid" "$dir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$gid" != '-' ]; then
|
||||
getent group $gid >/dev/null
|
||||
if [[ "$?" = 0 ]]; then
|
||||
chgrp "$gid" "$dir"
|
||||
if [ "$gid" != '-' ]; then
|
||||
getent group $gid >/dev/null
|
||||
if [[ "$?" = 0 ]]; then
|
||||
chgrp "$gid" "$dir"
|
||||
fi
|
||||
fi
|
||||
if [ "$mode" != '-' ]; then
|
||||
chmod "$mode" "$dir"
|
||||
fi
|
||||
fi
|
||||
if [ "$mode" != '-' ]; then
|
||||
chmod "$mode" "$dir"
|
||||
fi
|
||||
done < "$mkd"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user