Skip to content

Commit

Permalink
fix order of file sourcing
Browse files Browse the repository at this point in the history
  • Loading branch information
yeoldegrove committed Dec 26, 2018
1 parent 85035e6 commit f3f9d78
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions psd.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
#!/bin/bash
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
source /etc/psdoom-ng.conf
fi

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
Expand All @@ -28,6 +22,12 @@ 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
source /etc/psdoom-ng.conf
fi

[[ ! -v PSDOOMPSCMD || -z $PSDOOMPSCMD ]] && Z="$(unset PSDOOMPSCMD)" || export PSDOOMPSCMD="${PSDOOMPSCMD}"
[[ ! -v PSDOOMRENICECMD || -z $PSDOOMRENICECMD ]] && Z="$(unset PSDOOMRENICECMD)" || export PSDOOMRENICECMD="${PSDOOMRENICECMD}"
[[ ! -v PSDOOMKILLCMD || -z $PSDOOMKILLCMD ]] && Z="$(unset PSDOOMKILLCMD)" || export PSDOOMKILLCMD="${PSDOOMKILLCMD}"
Expand Down

0 comments on commit f3f9d78

Please sign in to comment.