|
@@ -4,14 +4,16 @@ set -euo pipefail
|
|
|
DOTFILES_DIR="${DOTFILES_DIR:=}"
|
|
DOTFILES_DIR="${DOTFILES_DIR:=}"
|
|
|
[ "$DOTFILES_DIR" ] || DOTFILES_DIR=$(pwd)
|
|
[ "$DOTFILES_DIR" ] || DOTFILES_DIR=$(pwd)
|
|
|
|
|
|
|
|
-msg=${|
|
|
|
|
|
|
|
+msg=$(
|
|
|
mapfile -d $'\0' -t pkgs < <(
|
|
mapfile -d $'\0' -t pkgs < <(
|
|
|
find "$DOTFILES_DIR" -maxdepth 1 -mindepth 1 -follow \
|
|
find "$DOTFILES_DIR" -maxdepth 1 -mindepth 1 -follow \
|
|
|
-type d \! -name '.*' \
|
|
-type d \! -name '.*' \
|
|
|
-printf '%f\0'
|
|
-printf '%f\0'
|
|
|
- )
|
|
|
|
|
- local IFS=,; REPLY="${pkgs[*]}";
|
|
|
|
|
-}
|
|
|
|
|
|
|
+ ) >/dev/null
|
|
|
|
|
+ #local IFS=,; REPLY="${pkgs[*]}";
|
|
|
|
|
+ IFS=,
|
|
|
|
|
+ echo "${pkgs[*]}"
|
|
|
|
|
+)
|
|
|
|
|
|
|
|
action="${1:?action must be apply, update, or remove}"
|
|
action="${1:?action must be apply, update, or remove}"
|
|
|
package="${2:?package must be one of $msg}"
|
|
package="${2:?package must be one of $msg}"
|