From 82400ffb7445754b262906daad029aa3a39a8fa5 Mon Sep 17 00:00:00 2001 From: "Ward Nakchbandi (CosmicFusion)" Date: Mon, 5 Aug 2024 22:36:44 +0200 Subject: [PATCH] Update main.sh --- main.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/main.sh b/main.sh index 6574cd6c9..c488e9695 100755 --- a/main.sh +++ b/main.sh @@ -30,16 +30,19 @@ cd $(find ./ -maxdepth 1 -name "$PIKA_PACKAGE_NAME*" -type d | head -1) # DO PATCHING if git clone --depth=1 https://git.pika-os.com/upstream-patches/"$PIKA_PACKAGE_NAME".git ../patches then - if cat ./debian/source/format | grep 'quilt' + if [ -f ../series ] then - cp -rvf ../patches/patches ./debian/ - cat ../series >> ./debian/patches/series - else - for i in $(cat ../series) - do - echo "Applying Patch: $i" - patch -Np1 -i ../patches/patches/$i || bash -c "echo "Applying Patch $i Failed!" && exit 2" - done + if cat ./debian/source/format | grep 'quilt' + then + cp -rvf ../patches/patches ./debian/ + cat ../series >> ./debian/patches/series + else + for i in $(cat ../series) + do + echo "Applying Patch: $i" + patch -Np1 -i ../patches/patches/$i || bash -c "echo "Applying Patch $i Failed!" && exit 2" + done + fi fi if [ -f ../native-series ] then