40 lines
962 B
Bash
Executable File
40 lines
962 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo -n $( dirname -- "$( readlink -f -- "$0" )" ) > pwd.txt
|
|
|
|
CWD=$(cat pwd.txt)
|
|
|
|
dir_list=$(find . -mindepth 2 -maxdepth 4 -name "PKGBUILD" -type f)
|
|
|
|
for i in ${dir_list[@]}
|
|
do
|
|
path="$(dirname $i)"
|
|
full_path="$CWD/$path"
|
|
|
|
echo "$full_path"
|
|
cd "$full_path"
|
|
|
|
$(basename $full_path)
|
|
|
|
git_dir=$(find . -mindepth 1 -maxdepth 1 -name "$(basename $full_path)" -type d)
|
|
if [ -d $git_dir ]; then
|
|
echo "rm $git_dir"
|
|
# rm "$git_dir"
|
|
fi
|
|
|
|
make_file=$(find . -mindepth 1 -maxdepth 1 -name "*make*\.sh" -type f)
|
|
if [ -f "$make_file" ]; then
|
|
echo "bash $make_file"
|
|
bash "$make_file"
|
|
else
|
|
makepkg --syncdeps --asdeps --needed --noconfirm --clean --cleanbuild --force
|
|
fi
|
|
unset make_file
|
|
cd $CWD
|
|
done
|
|
|
|
echo "melawy" | beep -f 200 -l 250 -d 100 -r 1 -n -s
|
|
notify-send -a "$(basename $(pwd)): Make and Move to" -t 10000 "$REPO" "$(date '+%Y.%m.%d %H:%M:%S')"
|
|
|
|
echo "Ready"
|