implement the f instruction.

This commit is contained in:
statzitz 2024-08-24 17:50:37 +02:00
parent 1f57e40d6d
commit 7884c4bbc4
3 changed files with 7 additions and 9 deletions

View file

@ -16,8 +16,6 @@ Rename u by uu, for update user.
### dotfiles to config ### dotfiles to config
Implement f instruction
make as function dotfiles to config make as function dotfiles to config
### config to dotfile ### config to dotfile

View file

@ -24,6 +24,6 @@ f /etc/makepkg.conf dotfiles/dotetc/makepkg.conf
f /etc/pacman.conf dotfiles/dotetc/makepkg.conf f /etc/pacman.conf dotfiles/dotetc/makepkg.conf
f /etc/doas.conf dotfiles/dotetc/doas.conf" f /etc/doas.conf dotfiles/dotetc/doas.conf"
# Use `git pull ~/Documents/git/${<repos>}` for u # Use `git pull ~/Documents/git/${<repos>}` for u -> OK
# Use `install -Dm644 <file_name> <dest>` for f # Use `install -Dm644 <file_name> <dest>` for f -> OK
# Use `cp -Rf <folder> <dest>` for d # Use `cp -Rf <folder> <dest>` for d -> OK

View file

@ -8,8 +8,8 @@ CONFIG_PATH="./config"
. ${CONFIG_PATH}/*.conf . ${CONFIG_PATH}/*.conf
echo "$_GIT_FOLDER" #echo "$_GIT_FOLDER"
echo "$_INSTRUCTIONS" #echo "$_INSTRUCTIONS"
while VAR= read -r line; while VAR= read -r line;
do do
@ -22,7 +22,7 @@ do
cp -Rf ${_GIT_FOLDER}/${operand_2}/* ${operand_1} cp -Rf ${_GIT_FOLDER}/${operand_2}/* ${operand_1}
elif [ "$order" = "f" ] elif [ "$order" = "f" ]
then then
echo ".. f detected .." install -Dm644 ${_GIT_FOLDER}/${operand_2} ${operand_1}
elif [ "$order" = "u" ] elif [ "$order" = "u" ]
then then
cd "${_GIT_FOLDER}/${operand_1}" cd "${_GIT_FOLDER}/${operand_1}"
@ -30,8 +30,8 @@ do
cd - cd -
else else
echo "Err, $order uknown" echo "Err, $order uknown"
echo ".. ${order} ${operand_1} ${operand_2} ..";
fi fi
echo ".. ${order} ${operand_1} ${operand_2} ..";
done <<< "$_INSTRUCTIONS" done <<< "$_INSTRUCTIONS"