27 lines
534 B
Bash
27 lines
534 B
Bash
|
#!/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
|