xbps-src: if euid can't write to masterdir, exit gracefully.
This commit is contained in:
parent
5dc6d62e3e
commit
cc85809e29
|
@ -215,11 +215,9 @@ check_config_vars()
|
||||||
msg_error "'${f}' not set in configuration file!\n"
|
msg_error "'${f}' not set in configuration file!\n"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ ! -d "$XBPS_MASTERDIR" ]; then
|
if [ ! -w "$XBPS_MASTERDIR" ]; then
|
||||||
mkdir -p "$val"
|
echo "ERROR: not enough perms for masterdir $XBPS_MASTERDIR.\n"
|
||||||
if [ $? -ne 0 ]; then
|
exit 1
|
||||||
msg_error "couldn't create 'XBPS_MASTERDIR' directory\n"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
[ -z "${_MASTERDIR_FLAG}" ] && export _MASTERDIR="$XBPS_MASTERDIR"
|
[ -z "${_MASTERDIR_FLAG}" ] && export _MASTERDIR="$XBPS_MASTERDIR"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue