From ebb26eac2948e02def3c7ac1ac23c4ecd345a5a7 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 3 Apr 2026 18:17:29 +0200 Subject: repo: flatten layout — move packages to root, extras to .extras/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move all packages from SlackBuilds/ to repo root - Move hooks/, docs/, nvchecker.toml to .extras/ - Update CLAUDE.md and README.md to reflect new structure Co-Authored-By: Claude Sonnet 4.6 --- syncthing/doinst.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 syncthing/doinst.sh (limited to 'syncthing/doinst.sh') diff --git a/syncthing/doinst.sh b/syncthing/doinst.sh new file mode 100644 index 0000000..9d663d4 --- /dev/null +++ b/syncthing/doinst.sh @@ -0,0 +1,25 @@ +config() { + NEW="$1" + OLD="`dirname $NEW`/`basename $NEW .new`" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +config etc/logrotate.d/syncthing.new +preserve_perms etc/rc.d/rc.syncthing.new -- cgit v1.2.3