Compare commits

...

2 commits

Author SHA1 Message Date
752fd63e63 save new skell 2024-08-03 17:15:10 +02:00
c9af9bc899 skell for save_config_file scritp 2024-08-03 17:04:51 +02:00
2 changed files with 32 additions and 3 deletions

View file

@ -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
View 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"