2024-07-17 12:18:27 +00:00
|
|
|
#!/bin/env fish
|
|
|
|
begin
|
|
|
|
set -l dir (status dirname)
|
2024-11-01 12:12:16 +00:00
|
|
|
source "$dir/../../lib/software.fish"
|
2024-10-11 23:54:31 +00:00
|
|
|
inherit "$dir/../../../Common/Software/logo-ls/main.fish"
|
2024-07-17 12:18:27 +00:00
|
|
|
|
|
|
|
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 "}" \
|
2024-07-17 12:18:27 +00:00
|
|
|
-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 12:18:27 +00:00
|
|
|
|
2024-07-17 13:54:53 +00:00
|
|
|
rm -rf "$contextRoot"
|
2024-07-17 12:18:27 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
runInstaller $argv
|
|
|
|
end
|