chore: Add a builder script

This commit is contained in:
Carlos Solís 2025-02-06 15:00:17 +00:00
parent a4a4194f41
commit f3ee8fabc6
3 changed files with 22 additions and 7 deletions

16
copy.sh Normal file
View file

@ -0,0 +1,16 @@
#!/bin/bash
for i in ./*.sh; do
shfmt -w "${i}"
shellcheck -o all -f diff "${i}" | patch -p1
i_tmp="${i##./}"
find /etc/cron.* -iname "${i_tmp%.sh}" | while read -r j; do
echo "${j}"
diff <(sed -e "s/friendica.example.net/hub.azkware.net/g" -e "s/#&>/\&\>/g" "${i}") "${j}"
sed -e "s/friendica.example.net/hub.azkware.net/g" -e "s/#&>/\&\>/g" "${i}" | sudo tee "${j}" &>/dev/null
done
find ../../Scripts -iname "${i_tmp}" | while read -r k; do
echo "${k}"
diff <(sed -e "s/friendica.example.net/hub.azkware.net/g" "${i}") "${k}"
sed -e "s/friendica.example.net/hub.azkware.net/g" "${i}" | sudo tee "${k}" &>/dev/null
done
done