slpkg/slackbuild/doinst.sh
Dimitris Zlatanidis da48af38b5 Remove rules.toml
2024-03-17 19:34:10 +02:00

14 lines
No EOL
293 B
Bash

config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
rm $NEW
fi
}
FILES="slpkg repositories blacklist"
for file in $FILES; do
config etc/slpkg/$file.toml.new
done