Skip to content

Instantly share code, notes, and snippets.

@syui
Created March 7, 2015 06:14
Show Gist options
  • Save syui/e1a23648f9aef95bbc9b to your computer and use it in GitHub Desktop.
Save syui/e1a23648f9aef95bbc9b to your computer and use it in GitHub Desktop.
--- /usr/bin/packer 2014-08-11 10:43:24.000000000 +0200
+++ /usr/bin/packer.xmw 2015-01-01 23:39:05.706239397 +0100
@@ -328,7 +328,9 @@
# Installation (makepkg and pacman)
if [[ $UID -eq 0 ]]; then
- makepkg $MAKEPKGOPTS --asroot -f
+ id pacman >/dev/null 2>/dev/null || useradd -r -d /var/empty pacman
+ chown -R pacman:pacman .
+ su -c "makepkg $MAKEPKGOPTS -f" pacman
else
makepkg $MAKEPKGOPTS -f
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment