From d33f451238cd9d6be08a105f8e5aae7feb310c63 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 16 Apr 2020 22:24:15 -0700 Subject: Make sure stumpwm-contrib is installed --- ellipsis.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ellipsis.sh b/ellipsis.sh index b4daede..02bdcc7 100644 --- a/ellipsis.sh +++ b/ellipsis.sh @@ -1,13 +1,26 @@ #!/usr/bin/env bash +stump_modules="${HOME}/.stumpwm.d/modules" + ensure_used_programs() { if ! util.cmd_exists "i3lock"; then echo "Can't find i3lock, screenlocking won't work." >&2 fi } +ensure_modules_installed() { + if ! test -d "$stump_modules"; then + echo "Downloading stumpwm-contrib" + + git.clone git://github.com/stumpwm/stumpwm-contrib.git "$stump_modules" + else + echo "Modules already installed" + fi +} + pkg.install() { ensure_used_programs + ensure_modules_used } pkg.pull() { @@ -16,4 +29,9 @@ pkg.pull() { pkg.reinstall() { ensure_used_programs + ensure_modules_used +} + +pkg.uninstall() { + rm -r "$stump_modules" } -- cgit v1.3-2-g0d8e