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
Implement f instruction
make as function dotfiles to config
### 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/doas.conf dotfiles/dotetc/doas.conf"
# Use `git pull ~/Documents/git/${<repos>}` for u
# Use `install -Dm644 <file_name> <dest>` for f
# Use `cp -Rf <folder> <dest>` for d
# Use `git pull ~/Documents/git/${<repos>}` for u -> OK
# Use `install -Dm644 <file_name> <dest>` for f -> OK
# Use `cp -Rf <folder> <dest>` for d -> OK

View file

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