Skip to content

Instantly share code, notes, and snippets.

@zhimsel

zhimsel/PKGBUILD.patch Secret

Last active Dec 16, 2020
Embed
What would you like to do?
From 2953dbcecfbc1de6cb93e169f4b10b604dfeb511 Mon Sep 17 00:00:00 2001
From: Zach Himsel <zach@himsel.net>
Date: Wed, 16 Dec 2020 15:54:06 -0700
Subject: [PATCH] Don't fail on 'rm' for missing files
---
PKGBUILD | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/PKGBUILD b/PKGBUILD
index da507f4..e1c7025 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -30,10 +30,10 @@ package_autokey-common() {
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- rm "$pkgdir/usr/bin/$pkgbase"{-qt,-gtk}
- rm "$pkgdir$site_packages/$pkgbase/"{gtkapp.py,qtapp.py}
- rm "$pkgdir$site_packages/$pkgbase/__pycache__/"{gtkapp*,qtapp*}
- rm "$pkgdir/usr/share/man/man1/$pkgbase"{-gtk*,-qt*}
+ rm -f "$pkgdir/usr/bin/$pkgbase"{-qt,-gtk}
+ rm -f "$pkgdir$site_packages/$pkgbase/"{gtkapp.py,qtapp.py}
+ rm -f "$pkgdir$site_packages/$pkgbase/__pycache__/"{gtkapp*,qtapp*}
+ rm -f "$pkgdir/usr/share/man/man1/$pkgbase"{-gtk*,-qt*}
rm -rf "$pkgdir$site_packages/$pkgbase/"{gtkui,qtui}
rm -rf "$pkgdir/usr/share/applications"
}
@@ -51,11 +51,11 @@ package_autokey-gtk() {
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- rm "$pkgdir/usr/bin/$pkgbase"{-qt,-run,-shell}
- rm "$pkgdir$site_packages/$pkgbase/"{common*,config*,__init__*,interface*,macro*,model*,monitor*,qtapp*,scripting*,service*}
- rm "$pkgdir$site_packages/$pkgbase/__pycache__/"{common*,config*,__init__*,interface*,macro*,model*,monitor*,qtapp*,scripting*,service*}
- rm "$pkgdir/usr/share/applications/$pkgbase-qt.desktop"
- rm "$pkgdir/usr/share/man/man1/$pkgbase"{-qt*,-run*}
+ rm -f "$pkgdir/usr/bin/$pkgbase"{-qt,-run,-shell}
+ rm -f "$pkgdir$site_packages/$pkgbase/"{common*,config*,__init__*,interface*,macro*,model*,monitor*,qtapp*,scripting*,service*}
+ rm -f "$pkgdir$site_packages/$pkgbase/__pycache__/"{common*,config*,__init__*,interface*,macro*,model*,monitor*,qtapp*,scripting*,service*}
+ rm -f "$pkgdir/usr/share/applications/$pkgbase-qt.desktop"
+ rm -f "$pkgdir/usr/share/man/man1/$pkgbase"{-qt*,-run*}
rm -rf "$pkgdir$site_packages/$pkgbase/"{iomediator,qtui}
rm -rf "$pkgdir$site_packages/"*.egg-info
rm -rf "$pkgdir/usr/share/icons"
@@ -73,11 +73,11 @@ package_autokey-qt() {
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- rm "$pkgdir/usr/bin/$pkgbase"{-gtk,-run,-shell}
- rm "$pkgdir$site_packages/$pkgbase/"{common*,config*,gtkapp*,__init__*,interface*,macro*,model*,monitor*,scripting*,service*}
- rm "$pkgdir$site_packages/$pkgbase/__pycache__/"{common*,config*,gtkapp*,__init__*,interface*,macro*,model*,monitor*,scripting*,service*}
- rm "$pkgdir/usr/share/applications/$pkgbase-gtk.desktop"
- rm "$pkgdir/usr/share/man/man1/$pkgbase"{-gtk*,-run*}
+ rm -f "$pkgdir/usr/bin/$pkgbase"{-gtk,-run,-shell}
+ rm -f "$pkgdir$site_packages/$pkgbase/"{common*,config*,gtkapp*,__init__*,interface*,macro*,model*,monitor*,scripting*,service*}
+ rm -f "$pkgdir$site_packages/$pkgbase/__pycache__/"{common*,config*,gtkapp*,__init__*,interface*,macro*,model*,monitor*,scripting*,service*}
+ rm -f "$pkgdir/usr/share/applications/$pkgbase-gtk.desktop"
+ rm -f "$pkgdir/usr/share/man/man1/$pkgbase"{-gtk*,-run*}
rm -rf "$pkgdir$site_packages/$pkgbase/"{iomediator,gtkui}
rm -rf "$pkgdir$site_packages/"*.egg-info
rm -rf "$pkgdir/usr/share/icons"
--
2.29.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment