Make install.sh call gen-colours
This commit is contained in:
19
install.sh
19
install.sh
@@ -50,11 +50,11 @@ link() {
|
|||||||
append_if_missing() {
|
append_if_missing() {
|
||||||
local file="$1" line="$2"
|
local file="$1" line="$2"
|
||||||
if [ ! -f "$file" ]; then
|
if [ ! -f "$file" ]; then
|
||||||
echo "$line" > "$file"
|
echo "$line" >"$file"
|
||||||
echo " Created $file with: $line"
|
echo " Created $file with: $line"
|
||||||
elif ! grep -qF "$line" "$file"; then
|
elif ! grep -qF "$line" "$file"; then
|
||||||
echo "" >> "$file"
|
echo "" >>"$file"
|
||||||
echo "$line" >> "$file"
|
echo "$line" >>"$file"
|
||||||
echo " Appended to $file: $line"
|
echo " Appended to $file: $line"
|
||||||
else
|
else
|
||||||
echo " Already in $file: $line"
|
echo " Already in $file: $line"
|
||||||
@@ -141,12 +141,17 @@ fi
|
|||||||
targets=()
|
targets=()
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
-h|--help) usage; exit 0 ;;
|
-h | --help)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
all) targets+=(hyprland cursor shell alacritty tmux nvim vim) ;;
|
all) targets+=(hyprland cursor shell alacritty tmux nvim vim) ;;
|
||||||
*) targets+=("$arg") ;;
|
*) targets+=("$arg") ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
"$SCRIPTS_DIR/sh/gen-colors"
|
||||||
|
|
||||||
for target in "${targets[@]}"; do
|
for target in "${targets[@]}"; do
|
||||||
case "$target" in
|
case "$target" in
|
||||||
hyprland) install_hyprland ;;
|
hyprland) install_hyprland ;;
|
||||||
@@ -158,7 +163,11 @@ for target in "${targets[@]}"; do
|
|||||||
tmux) install_tmux ;;
|
tmux) install_tmux ;;
|
||||||
nvim) install_nvim ;;
|
nvim) install_nvim ;;
|
||||||
vim) install_vim ;;
|
vim) install_vim ;;
|
||||||
*) echo "Unknown target: $target"; usage; exit 1 ;;
|
*)
|
||||||
|
echo "Unknown target: $target"
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user