Compare commits
2 commits
3f02c8f5f6
...
752fd63e63
Author | SHA1 | Date | |
---|---|---|---|
752fd63e63 | |||
c9af9bc899 |
2 changed files with 32 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
_DOTFILES="~/Documents/git/dotfiles"
|
_DOTFILES="~/Documents/git/dotfiles"
|
||||||
|
|
||||||
_FILE_TO_COPY="d ~/.config/alacritty dotconfig
|
_FILE_TO_COPY='d ~/.config/alacritty dotconfig
|
||||||
d ~/.config/eww dotconfig
|
d ~/.config/eww dotconfig
|
||||||
d ~/.config/hypr dotconfig
|
d ~/.config/hypr dotconfig
|
||||||
d ~/.config/nvim dotconfig
|
d ~/.config/nvim dotconfig
|
||||||
|
@ -15,8 +15,7 @@ d ~/.local/bin dotlocal
|
||||||
d /etc/ly dotetc
|
d /etc/ly dotetc
|
||||||
f /etc/makepkg.conf dotetc/makepkg.conf
|
f /etc/makepkg.conf dotetc/makepkg.conf
|
||||||
f /etc/pacman.conf dotetc/makepkg.conf
|
f /etc/pacman.conf dotetc/makepkg.conf
|
||||||
f /etc/doas.conf dotetc/doas.conf
|
f /etc/doas.conf dotetc/doas.conf'
|
||||||
"
|
|
||||||
|
|
||||||
# Use `install -Dm644 <file_name> <dest>` for f
|
# Use `install -Dm644 <file_name> <dest>` for f
|
||||||
# Use `cp -Rf <folder> <dest>` for d
|
# Use `cp -Rf <folder> <dest>` for d
|
||||||
|
|
30
save_config_file
Executable file
30
save_config_file
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd "$( dirname "$( readlink -f "$0" )" )" || exit
|
||||||
|
|
||||||
|
CONFIG_PATH="./config"
|
||||||
|
|
||||||
|
. ./config/*.conf
|
||||||
|
|
||||||
|
echo "$_FILE_TO_COPY"
|
||||||
|
echo "$_DOTFILES"
|
||||||
|
|
||||||
|
while VAR= read -r line;
|
||||||
|
do
|
||||||
|
order="$(echo $line | cut -d ' ' -f 1)"
|
||||||
|
file_on_computer="$(echo $line | cut -d ' ' -f 2)"
|
||||||
|
file_on_dotfile="$(echo $line | cut -d ' ' -f 3)"
|
||||||
|
|
||||||
|
if [ "$order" = "d" ]
|
||||||
|
then
|
||||||
|
echo ".. d detected .."
|
||||||
|
elif [ "$order" = "f" ]
|
||||||
|
then
|
||||||
|
echo ".. f detected .."
|
||||||
|
else
|
||||||
|
echo "Err, $order uknown"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo " .. $order $file_on_computer $file_on_dotfile.. ";
|
||||||
|
|
||||||
|
done <<< "$_FILE_TO_COPY"
|
Loading…
Reference in a new issue