We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 057fcd3 commit bd822bbCopy full SHA for bd822bb
setup/debian/makedeb_xcsg.sh
@@ -7,6 +7,9 @@ if [ "$EUID" -ne 0 ]
7
exit
8
fi
9
10
+# Get user's home dir (sudo's home is /root ....)
11
+USER_HOME=$(getent passwd $SUDO_USER | cut -d: -f6)
12
+
13
check_distro2(){
14
if [[ -e /etc/redhat-release ]]
15
then
@@ -36,7 +39,7 @@ echo "$PACKAGE_NAME *.deb build started....please wait"
36
39
# CPDE_USR defines where to find the binaries to package. We don't have to check
37
40
# that $CPDE_USR exists, because epm will do it and report any errors
38
41
if [ -z ${CPDE_USR+x} ]; then
- export CPDE_USR=~/cpde_usr
42
+ export CPDE_USR=$USER_HOME/cpde_usr
43
echo "CPDE_USR is unset, defaults to '$CPDE_USR'";
44
else
45
echo "CPDE_USR is set to '$CPDE_USR'";
0 commit comments