aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-02-17 15:46:32 -0300
committerEuAndreh <eu@euandre.org>2023-02-17 15:46:32 -0300
commit57c66c4ea00ab57aea72bd2039ed5eac2395f9c5 (patch)
treeb60e9effca47654c0a05efcbf9fb04d58b806874
parentRemove all code referring to backlight tweaking (diff)
downloaddotfiles-57c66c4ea00ab57aea72bd2039ed5eac2395f9c5.tar.gz
dotfiles-57c66c4ea00ab57aea72bd2039ed5eac2395f9c5.tar.xz
bin/li: Assert $IMAGE dir exists before trying to write to it
-rwxr-xr-xbin/li3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/li b/bin/li
index 1e7917f..33f5d3a 100755
--- a/bin/li
+++ b/bin/li
@@ -81,6 +81,9 @@ fi
IMAGE="${XDG_DATA_HOME:-$HOME/.local/share}/lisp-cli/$IMPL.image"
BIN="$(command -v cl)"
INIT="${XDG_CONFIG_HOME:-$HOME/.config}/lisp-cli/init.lisp"
+
+mkdir -p "$(dirname "$IMAGE")"
+
if [ ! -e "$IMAGE" ]; then
printf 'Bootstrapping a new "%s" image...\n' "$IMPL" >&2
cl \