Last active
December 9, 2018 14:10
-
-
Save yeoldegrove/0f7463a86aade97bdbe7346f8d1ea841 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- pkg/psdoom-ng/usr/bin/psd.org 2018-12-09 15:07:54.995580001 +0100 | |
+++ pkg/psdoom-ng/usr/bin/psd 2018-12-09 15:10:20.078561219 +0100 | |
@@ -1,4 +1,25 @@ | |
#!/bin/bash | |
+if [[ ! -f /home/${USER}/.psdoom-ng/psdoom-ng.conf ]]; then | |
+ mkdir -p /home/${USER}/.psdoom-ng | |
+ cat << EOF > /home/${USER}/.psdoom-ng/psdoom-ng.conf | |
+PSDOOMPSCMD="${HOME}/.psdoom-ng/ps.sh" | |
+PSDOOMRENICECMD="renice" | |
+PSDOOMKILLCMD="kill -9" | |
+DOOMWADPATH="${HOME}/.psdoom-ng/psdoom-data" | |
+# doom1e1p1 pid monster start coordinates | |
+#DEFAULT_ARGS="-psuser ${USER} -episode 1 -godstart -telestartf 136310834 -257677815" | |
+DEFAULT_ARGS="-psallusers -episode 1 -godstart" | |
+EOF | |
+fi | |
+ | |
+if [[ ! -f /home/${USER}/.psdoom-ng/ps.sh ]]; then | |
+ cat << EOF > /home/${USER}/.psdoom-ng/ps.sh | |
+#!/bin/bash | |
+ps aux|awk '{print \$1,\$2,\$11,"0"}'|grep -v '^USER'|grep -v '\[' | |
+EOF | |
+ chmod +x /home/${USER}/.psdoom-ng/ps.sh | |
+fi | |
+ | |
if [[ -f /home/${USER}/.psdoom-ng/psdoom-ng.conf ]]; then | |
source /home/${USER}/.psdoom-ng/psdoom-ng.conf | |
elif [[ -f /etc/psdoom-ng.conf ]]; then |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment