arch-plasma-nm-sso/install.sh

37 lines
1 KiB
Bash
Raw Permalink Normal View History

#!/bin/bash
pkgName=plasma-nm;
pkgDir="$pkgName";
patchName="sso.patch";
workingDir="$(pwd)";
contextDir="$(mktemp -d)";
tempDir="$(mktemp -d)";
cd "$contextDir";
yay -G -f "$pkgName";
git clone https://invent.kde.org/plasma/plasma-nm.git "$tempDir";
cd "$tempDir";
git format-patch -1 c1fff723f2e1ee117a10809562c9142103910a70 --stdout > "$contextDir/$pkgDir/1-$patchName";
git format-patch -1 6ef64be8645ac32fc0b42df2cee5d9ff3b57e485 --stdout > "$contextDir/$pkgDir/2-$patchName";
cd "$contextDir";
rm -rf "$tempDir";
cd "$pkgDir";
sed -i \
-e "s/^source=(/\01-$patchName 2-$patchName /" \
-e "s/^sha256sums=(/\0'SKIP' 'SKIP'\n/" \
-e '/^build() {$/,/^}$/{' \
-e '/{$/{' \
-e 'a cd "$pkgname-$pkgver"' \
-e "a cat '../1-$patchName' | patch --strip 1 --forward --merge" \
-e "a cat '../2-$patchName' | patch --strip 1 --forward --merge" \
-e "a cd .." \
-e '}' \
-e '}' \
PKGBUILD;
makepkg -si --skippgpcheck --noconfirm;
cd "$workingDir";
rm -rf "$contextDir";