Update main.sh

This commit is contained in:
Ward Nakchbandi (CosmicFusion) 2024-08-05 22:40:18 +02:00
parent b1d070f03e
commit e4e7cf7b36

10
main.sh
View File

@ -30,23 +30,23 @@ cd $(find ./ -maxdepth 1 -name "$PIKA_PACKAGE_NAME*" -type d | head -1)
# DO PATCHING # DO PATCHING
if git clone --depth=1 https://git.pika-os.com/upstream-patches/"$PIKA_PACKAGE_NAME".git ../patches if git clone --depth=1 https://git.pika-os.com/upstream-patches/"$PIKA_PACKAGE_NAME".git ../patches
then then
if [ -f ../series ] if [ -f ../patches/series ]
then then
if cat ./debian/source/format | grep 'quilt' if cat ./debian/source/format | grep 'quilt'
then then
cp -rvf ../patches/patches ./debian/ cp -rvf ../patches/patches ./debian/
cat ../series >> ./debian/patches/series cat ../patches/series >> ./debian/patches/series
else else
for i in $(cat ../series) for i in $(cat ../patches/series)
do do
echo "Applying Patch: $i" echo "Applying Patch: $i"
patch -Np1 -i ../patches/patches/$i || bash -c "echo "Applying Patch $i Failed!" && exit 2" patch -Np1 -i ../patches/patches/$i || bash -c "echo "Applying Patch $i Failed!" && exit 2"
done done
fi fi
fi fi
if [ -f ../native-series ] if [ -f ../patches/native-series ]
then then
for i in $(cat ../native-series) for i in $(cat ../patches/native-series)
do do
echo "Applying Patch: $i" echo "Applying Patch: $i"
patch -Np1 -i ../patches/patches/$i || bash -c "echo "Applying Patch $i Failed!" && exit 2" patch -Np1 -i ../patches/patches/$i || bash -c "echo "Applying Patch $i Failed!" && exit 2"