Update pika-hyprland-settings/debian/postinst

This commit is contained in:
ferreo 2024-10-27 18:23:11 +01:00
parent c2fa335015
commit a2920ce604

View File

@ -2,21 +2,22 @@
set -e set -e
# Check if /home has any subdirectories
if [ "$(ls -A /home)" ]; then
for u in /home/*; do
# Check if the current item is a directory
if [ -d "$u" ]; then
if [ ! -f "${u}/.config/hypr/hypridle.conf" ]; then
cp -a /etc/skel/. "${u}/"
chown -R "$(basename "$u"):$(basename "$u")" "${u}/"
fi
for u in /home/* if [ ! -f "${u}/.config/ags/widgets/systray.js" ]; then
do mkdir -p "${u}/.config/ags/"
if [[ "${u}" == '/home/*' ]] cp -af /etc/skel/.config/ags/. "${u}/.config/ags/"
then fi
continue
fi
if ! test -f "${u}/.config/hypr/hypridle.conf"
then
cp -a /etc/skel/. "${u}/"
chown -R "${u}:${u}" "${u}/"
fi
if ! test -f "${u}/.config/ags/widgets/systray.js"
then
cp -af /etc/skel/.config/ags/. "${u}/.config/ags/"
fi fi
done done
else
echo "/home is empty. No user directories to process."
fi