PKGBUILD/3PARTY/obs/deps3/git_pull.sh

27 lines
534 B
Bash
Raw Normal View History

2024-07-19 22:36:59 +05:00
#!/bin/bash
echo -n $( dirname -- "$( readlink -f -- "$0" )" ) > pwd.txt
CWD=$(cat pwd.txt)
i=0
for package_dir in $(find . -mindepth 1 -maxdepth 1 -type d)
do
i=$(( $i + 1 ))
echo "${i} ${CWD}/${package_dir}"
cd "${CWD}/${package_dir}"
if [ -d ".git" ]; then
git pull
fi
cd "${CWD}"
echo ""
done
echo "Ready"
sleep 5
process=$(ps x | grep konsole | grep "${0}" | awk '{print $1}')
if [ $(( "${process}" + 0 )) -ne 0 ]; then
kill $(ps x | grep konsole | grep "${0}" | awk '{print $1}')
fi