mirror of
https://codeberg.org/hyperreal/home-manager
synced 2024-11-25 20:13:41 +01:00
32 lines
880 B
Bash
32 lines
880 B
Bash
|
#!/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"
|