mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-16 07:47:35 +01:00
14 lines
No EOL
293 B
Bash
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 |