more script adds

This commit is contained in:
xsghetti 2024-03-13 13:01:33 -04:00
parent a11d325a19
commit e1df303d71
15 changed files with 621 additions and 0 deletions

32
Scripts/.old/restore_chk.sh Executable file
View file

@ -0,0 +1,32 @@
#!/bin/bash
#|---/ /+--------------------------------------+---/ /|#
#|--/ /-| Script to compare git and local dots |--/ /-|#
#|-/ /--| Prasanth Rangan |-/ /--|#
#|/ /---+--------------------------------------+/ /---|#
source global_fn.sh
if [ $? -ne 0 ] ; then
echo "Error: unable to source global_fn.sh, please execute from $(dirname "$(realpath "$0")")..."
exit 1
fi
CfgDir=`echo $CloneDir/Configs`
while read lst
do
pth=`echo $lst | awk -F '|' '{print $1}'`
cfg=`echo $lst | awk -F '|' '{print $2}'`
pth=`eval echo $pth`
echo "${cfg}" | xargs -n 1 | while read cfg_chk
do
tgt=`echo $pth | sed "s+^${HOME}++g"`
if [ `diff -qr --no-dereference ${pth}/$cfg_chk $CfgDir$tgt/$cfg_chk | wc -l` -gt 0 ]
then
echo "diff found ${pth}/$cfg_chk <--> $CfgDir$tgt/$cfg_chk"
fi
done
done < restore_conf.lst