summaryrefslogtreecommitdiff
path: root/librechroot
diff options
context:
space:
mode:
Diffstat (limited to 'librechroot')
-rwxr-xr-xlibrechroot7
1 files changed, 4 insertions, 3 deletions
diff --git a/librechroot b/librechroot
index 99adcc0..ec437de 100755
--- a/librechroot
+++ b/librechroot
@@ -21,12 +21,13 @@
# You should have received a copy of the GNU General Public License
# along with Parabola. If not, see <http://www.gnu.org/licenses/>.
+source /etc/libretools.conf
+
[[ "$UID" != "0" ]] && {
- echo "This script must be run as root."
+ error "This script must be run as root."
exit 1
}
-source /etc/libretools.conf
custom_config=${XDG_CONFIG_HOME}/libretools/libretools.conf
[[ -e ${custom_config} ]] && source ${custom_config}
@@ -35,7 +36,7 @@ root=${1:-$CHCOPY}
CACHEDIR=${CACHEDIR:-/var/cache/pacman/pkg}
[[ ! -d ${CHROOTDIR}/${root} ]] && {
- echo "${CHROOTDIR}/$root is not a dir."
+ error "${CHROOTDIR}/$root is not a dir."
exit 1
}