diff options
Diffstat (limited to 'bin/.local')
-rwxr-xr-x | bin/.local/bin/install_dotfiles | 7 | ||||
-rwxr-xr-x | bin/.local/bin/install_wget | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/bin/.local/bin/install_dotfiles b/bin/.local/bin/install_dotfiles new file mode 100755 index 0000000..ecc7371 --- /dev/null +++ b/bin/.local/bin/install_dotfiles @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +dotfiles_directory=$HOME/dotfiles + +cd "$dotfiles_directory" || { echo "Nonexistent directory $dotfiles_directory"; exit; } +find . -mindepth 1 -maxdepth 1 -printf "%P\\0" | grep -zvFf .stowignore | \ + xargs -0 stow -t "$HOME" --no-folding diff --git a/bin/.local/bin/install_wget b/bin/.local/bin/install_wget new file mode 100755 index 0000000..4800e8d --- /dev/null +++ b/bin/.local/bin/install_wget @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +find . -type f -name "*.wget" | \ + while read -r file; do + destination=$HOME/$(echo "${file%.*}" | sed 's#\./[^/]*/##') + mkdir -p "$(dirname "$destination")" + wget "$(cat "$file")" -O "$destination" + if [[ "$file" == ./bin/* ]]; then + chmod +x "$destination" + fi + done && echo "Installation successful" |