summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormyself6002023-01-01 13:26:17 +0100
committermyself6002023-01-01 13:26:17 +0100
commitad883a725612f3d1570051705da912fb9845351d (patch)
tree6e612541fe92a9321fc7364e10033cf0786622c8
parente9907d66dbc825cd4d7e9a9524f30071bcd64eda (diff)
downloadaur-ad883a725612f3d1570051705da912fb9845351d.tar.gz
Fix truncation of username
-rw-r--r--PKGBUILD6
-rw-r--r--zlodej.install15
2 files changed, 10 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d33052cc61aa..d023b2b7f1c6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@ install=zlodej.install
source=(https://download.sf.net/cosp/Original%20Game%20Files/The%20Clue%21%20%28Czech%29/ClueCZ.zip)
md5sums=(18966a76e3911db6e185be77aba925b3)
package(){
- rm DATADISK/GAMES.LST # zachovej po odstranění balíčku
- install -dm757 $pkgdir/usr/share/zlodej/DATADISK
- cp -r DATA{,DISK} INTROPIX PICTURES SAMPLES SOUNDS TEXTS $pkgdir/usr/share/zlodej
+ rm DATADISK/GAMES.LST # zachovej po odstranění balíčku
+ install -dm757 "$pkgdir"/usr/share/zlodej/DATADISK
+ cp -r DATA{,DISK} INTROPIX PICTURES SAMPLES SOUNDS TEXTS "$pkgdir"/usr/share/zlodej
}
diff --git a/zlodej.install b/zlodej.install
index c1233a6190ae..201dde018d3e 100644
--- a/zlodej.install
+++ b/zlodej.install
@@ -1,14 +1,13 @@
+DIR=/usr/share/zlodej/DATADISK
post_install(){
- DIR=/usr/share/zlodej/DATADISK
- cp -n $DIR/{ORIGIN,GAMES}.LST
- USER=`w|tail -1|cut -d' ' -f1`
- chown $USER:$USER $DIR/GAMES.LST
+ cp -n $DIR/{ORIGIN,GAMES}.LST
+ USER=`who -m|cut -d\ -f1`
+ chown $USER: $DIR/GAMES.LST
}
pre_remove(){
- DIR=/usr/share/zlodej/DATADISK
- [ "`diff $DIR/{ORIGIN,GAMES}.LST`" = "" ] && rm $DIR/GAMES.LST || true
+ [ "`diff $DIR/{ORIGIN,GAMES}.LST`" = "" ] && rm $DIR/GAMES.LST || true
}
post_remove(){
- DIR=/usr/share/zlodej
- [ -d $DIR ] && echo -e "\e[31mNásledující soubory nebyly odstraněny:\n\n`find $DIR -type f|sort`\e[m" || true
+ DIR=/usr/share/zlodej
+ [ -d $DIR ] && echo -e "\e[31mNásledující soubory nebyly odstraněny:\n\n`find $DIR -type f|sort`\e[m" || true
}