mirror of
https://github.com/KDE/kde-linux.git
synced 2025-12-24 00:18:23 -05:00
If/when !95 merges, this will be the only Python script in the build process left. Rewrite to (ba)sh like the rest for consistency, then we can port everything to some other language if desired one day.
26 lines
742 B
Bash
Executable File
26 lines
742 B
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
# SPDX-FileCopyrightText: 2024 Harald Sitter <sitter@kde.org>
|
|
# SPDX-FileCopyrightText: 2024 Bruno Pajdek <brupaj@proton.me>
|
|
|
|
# Something in GitLab causes bogus permissions to be set for mkosi stuff,
|
|
# reset them to something sane.
|
|
|
|
# Enable ** for recursive globbing and include hidden files when doing so.
|
|
shopt -s globstar dotglob
|
|
|
|
# Loop through all mkosi files.
|
|
for FILE in mkosi.*/**/*; do
|
|
# Skip symlinks.
|
|
if [ -L "$FILE" ]; then
|
|
continue
|
|
fi
|
|
|
|
# If the file is executable, reset permissions to 755, else to 644.
|
|
if [ -x "$FILE" ]; then
|
|
chmod 755 "$FILE"
|
|
else
|
|
chmod 644 "$FILE"
|
|
fi
|
|
done
|