diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-02-20 20:02:56 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-02-20 20:02:56 +0100 |
commit | b04ea7d3d725365444893b3e179f2dd9edf77092 (patch) | |
tree | 619046d729401afb0b9652976b22c194e81d4311 /stowcmds.sh | |
parent | 7330b602bf66d81fda94fd99dca06607f7b1789d (diff) |
added: (stowcmds) laptop stowcmds and error handling
Diffstat (limited to 'stowcmds.sh')
-rw-r--r-- | stowcmds.sh | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/stowcmds.sh b/stowcmds.sh index f7b3345..4874d48 100644 --- a/stowcmds.sh +++ b/stowcmds.sh @@ -1,7 +1,20 @@ -#!/usr/bin/env bash +#!/bin/sh -case "${MACH:=desktop}" in - 'desktop') +if ! stow --version > /dev/null 2>&1 +then + echo "E: stow not installed or not found" 1>&2 + exit 1 +fi +if [ -n "$MACH" ] +then + echo "I: stowing for $MACH" +else + echo "E: MACH not set" + exit 1 +fi + +case "$MACH" in + "desktop") mkdir -p "$HOME/bin" stow -d bin/ -t "$HOME/bin" -R common dmscripts extra mkdir -p "$HOME/.config" @@ -15,6 +28,13 @@ case "${MACH:=desktop}" in stow -d config/ -t "$HOME/.config" -R essentials common stow -d config/ -t "$HOME/" -R zshrc ;; + "laptop") + mkdir -p "$HOME/bin" + stow -d bin/ -t "$HOME/bin" -R common dmscripts extra + mkdir -p "$HOME/.config" + stow -d config/ -t "$HOME/.config" -R essentials common extra theme hyprland X + stow -d config/ -t "$HOME/" -R zshrc + ;; *) break esac |