2016-07-22 00:53:39 +02:00
|
|
|
#!/usr/bin/bash
|
2016-09-19 22:18:45 +02:00
|
|
|
|
|
|
|
# Syncs the different variants of mingw-w64-qt5-base
|
|
|
|
|
2016-07-22 00:53:39 +02:00
|
|
|
set -e # abort on first error
|
2017-01-23 21:37:13 +01:00
|
|
|
master="${1:-mingw-w64}"
|
2016-07-22 00:53:39 +02:00
|
|
|
|
2018-02-15 00:14:36 +01:00
|
|
|
[[ -d 'qt5-base' ]] && pushd 'qt5-base' || pushd .
|
|
|
|
|
2017-10-13 19:04:11 +02:00
|
|
|
if [ $# -gt 1 ]; then
|
2016-07-22 00:53:39 +02:00
|
|
|
echo "Error: too many arguments specified"
|
|
|
|
echo "Usage: $0 master_dir"
|
|
|
|
exit -2
|
|
|
|
elif [[ ! -d $master ]]; then
|
|
|
|
echo "Error: specified master $master does not exist"
|
|
|
|
exit -3
|
|
|
|
fi
|
|
|
|
|
2017-10-13 19:04:11 +02:00
|
|
|
for dir in mingw-w64 mingw-w64-*; do
|
2017-10-13 21:29:48 +02:00
|
|
|
[[ $dir == *'-test' ]] && continue
|
2016-07-22 00:53:39 +02:00
|
|
|
if [[ $dir != $master ]] && [[ -d $dir ]]; then
|
2017-10-13 19:04:11 +02:00
|
|
|
rm "$dir/"* # clean first (files might have been removed in master)
|
2016-07-22 00:53:39 +02:00
|
|
|
cp "$master/"* "$dir"
|
|
|
|
sed -e '/pkgname=mingw-w64-qt5-base/{c\pkgname=mingw-w64-qt5-base'${dir#mingw-w64} -e ';d}' "$master/PKGBUILD" > "$dir/PKGBUILD"
|
|
|
|
fi
|
|
|
|
done
|
2018-02-15 00:14:36 +01:00
|
|
|
|
|
|
|
popd
|