diff options
author | myself600 | 2023-01-01 13:26:17 +0100 |
---|---|---|
committer | myself600 | 2023-01-01 13:26:17 +0100 |
commit | ad883a725612f3d1570051705da912fb9845351d (patch) | |
tree | 6e612541fe92a9321fc7364e10033cf0786622c8 | |
parent | e9907d66dbc825cd4d7e9a9524f30071bcd64eda (diff) | |
download | aur-ad883a725612f3d1570051705da912fb9845351d.tar.gz |
Fix truncation of username
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | zlodej.install | 15 |
2 files changed, 10 insertions, 11 deletions
@@ -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 } |