mirror of
https://codeberg.org/hyperreal/dotfiles
synced 2024-11-01 08:43:08 +01:00
32 lines
880 B
Bash
Executable File
32 lines
880 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
git_files=$(cd "${HOME}" && git ls-tree --name-only main)
|
|
|
|
while IFS= read -r line; do
|
|
case $line in
|
|
".config")
|
|
config_files=$(cd "${HOME}/.config" && git ls-tree --name-only main)
|
|
mkdir -p "$(pwd)/.config"
|
|
while IFS= read -r line; do
|
|
cp -rfv "${HOME}/.config/$line" "$(pwd)/.config/"
|
|
done <<< "$config_files"
|
|
;;
|
|
".gitignore")
|
|
echo "Skipping .gitignore"
|
|
;;
|
|
".gnupg")
|
|
echo "Skipping .gnupg"
|
|
;;
|
|
".local")
|
|
mkdir -p "$(pwd)/.local/share"
|
|
cp -rfv "${HOME}/.local/share/rofi" "$(pwd)/.local/share/"
|
|
;;
|
|
".ssh")
|
|
echo "Skipping .ssh"
|
|
;;
|
|
*)
|
|
cp -rfv "${HOME}/$line" "$(pwd)/"
|
|
;;
|
|
esac
|
|
done <<< "$git_files"
|