PortValhalla/scripts/Arch/Software/logo-ls/main.fish

40 lines
1.1 KiB
Fish
Raw Normal View History

#!/bin/env fish
begin
set -l dir (status dirname)
2024-11-01 12:12:16 +00:00
source "$dir/../../lib/software.fish"
inherit "$dir/../../../Common/Software/logo-ls/main.fish"
function installSW -V dir
set -l dirName (realpath "$dir")
set -l contextRoot (mktemp -d)
set -l pkgName logo-ls
set -l patchName workaround.patch
2024-07-17 13:54:53 +00:00
if not type -q logo-ls
begin
2024-10-06 19:25:34 +00:00
pushd "$contextRoot" >/dev/null
2024-07-17 13:54:53 +00:00
yay -G -f "$pkgName"
cd "$pkgName"
cp "$dirName/$patchName" .
sed -i \
-e "/^source=(/s/source=(/\0$patchName /" \
-e "/^md5sums=(/s/^md5sums=(/\0SKIP /" \
-e "/^build() {/,/}/{" \
-e "/^[[:space:]]*cd/{" \
-e "a cat ../$patchName | patch --strip 1 --forward --merge" \
-e "}" \
-e "}" \
2024-07-17 13:54:53 +00:00
PKGBUILD
makepkg --noconfirm -si --force
2024-10-06 19:25:34 +00:00
popd >/dev/null
2024-07-17 13:54:53 +00:00
end
2024-07-17 13:54:53 +00:00
rm -rf "$contextRoot"
end
end
runInstaller $argv
end