Add zellij config to rsync-local-config
This commit is contained in:
parent
78cfb418d7
commit
e8809dc0fe
|
@ -1,20 +1,20 @@
|
|||
HOST=$1
|
||||
for TARGET in bat git starship.toml; do
|
||||
SOURCE="$HOME/.config/$TARGET"
|
||||
TMP_TARGET=/tmp/rsync-local-config
|
||||
TMP_SOURCE=$TMP_TARGET
|
||||
NIX_SED="sed -i 's|/nix/.*/bin/||g'"
|
||||
NIX_REPLACE="$NIX_SED $TMP_TARGET"
|
||||
if [[ -e $SOURCE ]]; then
|
||||
if [[ -d $SOURCE ]]; then
|
||||
SOURCE=$SOURCE/
|
||||
TMP_SOURCE=$TMP_SOURCE/
|
||||
NIX_REPLACE="fd -g '**' $TMP_TARGET -tfile -x $NIX_SED {};"
|
||||
fi
|
||||
rsync -avzL --exclude=".git*" $SOURCE $TMP_TARGET
|
||||
chmod u+rw -R $TMP_SOURCE
|
||||
sh -c "$NIX_REPLACE"
|
||||
rsync -avzL --delete --exclude=".git*" $TMP_SOURCE $HOST:.config/$TARGET
|
||||
rm -rf $TMP_SOURCE
|
||||
fi
|
||||
for TARGET in bat git zellij starship.toml; do
|
||||
SOURCE="$HOME/.config/$TARGET"
|
||||
TMP_TARGET=/tmp/rsync-local-config
|
||||
TMP_SOURCE=$TMP_TARGET
|
||||
NIX_SED="sed -i 's|/nix/.*/bin/||g'"
|
||||
NIX_REPLACE="$NIX_SED $TMP_TARGET"
|
||||
if [[ -e $SOURCE ]]; then
|
||||
if [[ -d $SOURCE ]]; then
|
||||
SOURCE=$SOURCE/
|
||||
TMP_SOURCE=$TMP_SOURCE/
|
||||
NIX_REPLACE="fd -g '**' $TMP_TARGET -tfile -x $NIX_SED {};"
|
||||
fi
|
||||
rsync -avzL --exclude=".git*" $SOURCE $TMP_TARGET
|
||||
chmod u+rw -R $TMP_SOURCE
|
||||
sh -c "$NIX_REPLACE"
|
||||
rsync -avzL --delete --exclude=".git*" $TMP_SOURCE $HOST:.config/$TARGET
|
||||
rm -rf $TMP_SOURCE
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue