diff options
author | Alexey Yerin <yyp@disroot.org> | 2025-03-21 14:57:38 +0300 |
---|---|---|
committer | Alexey Yerin <yyp@disroot.org> | 2025-03-21 14:57:38 +0300 |
commit | 1f81aa0bbfd363b1d264b5b19ef086b5bdd1260e (patch) | |
tree | 51171590e0f31292f61778783a3e7d2ab0c7de65 /scripts | |
parent | 100753a060bebb9ad33a2b56722a4e83faba3fea (diff) |
Improve install and uninstall tasks
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install-modules | 10 | ||||
-rwxr-xr-x | scripts/uninstall-modules | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/scripts/install-modules b/scripts/install-modules new file mode 100755 index 0000000..5f61004 --- /dev/null +++ b/scripts/install-modules @@ -0,0 +1,10 @@ +#!/bin/sh -eu + +install_dir="$1" +shift + +for mod; do + printf "installing %s\n" "$mod" + mkdir -p "$install_dir/$mod" + install -m644 "$mod"/* "$install_dir/$mod" +done diff --git a/scripts/uninstall-modules b/scripts/uninstall-modules new file mode 100755 index 0000000..545c19d --- /dev/null +++ b/scripts/uninstall-modules @@ -0,0 +1,9 @@ +#!/bin/sh -eu + +install_dir="$1" +shift + +for mod; do + printf "uninstalling %s\n" "$mod" + rm -r "$install_dir/$mod" +done |