From 1afc7724cbe53d6713c29434e6c9695125711be9 Mon Sep 17 00:00:00 2001 From: Hayden Hamilton Date: Mon, 14 Sep 2026 21:21:36 +0100 Subject: Clone hhvn.uk-scripts make infrastucture --- Makeuninstall.rc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 Makeuninstall.rc (limited to 'Makeuninstall.rc') diff --git a/Makeuninstall.rc b/Makeuninstall.rc new file mode 100755 index 0000000..5ee5003 --- /dev/null +++ b/Makeuninstall.rc @@ -0,0 +1,30 @@ +#!/bin/rc + +# This script will uninstall all scripts/dirs copied into $1 +# It uses rmdir(1) to prevent removal of any files from elsewhere + +bin = $1 + +if (test -f .installed) { + installed = `$nl{cat .installed} + for (s in $installed) { + echo RM $bin/$s + rm $bin/$s + removed = ($removed $bin/$s) + } + rm .installed +} + +if (test -f .dirsmade) { + dirsmade = `$nl{cat .dirsmade} + for (d in $dirsmade) { + echo RMDIR $bin/$d + rmdir $bin/$d + removed = ($removed $bin/$s) + } + rm .dirsmade +} + +if (~ $removed ()) { + echo nothing to remove +} -- cgit v1.2.3