summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util.sh6
-rwxr-xr-xsrc/xi.sh7
2 files changed, 2 insertions, 11 deletions
diff --git a/src/util.sh b/src/util.sh
index 55af05e..96d326d 100644
--- a/src/util.sh
+++ b/src/util.sh
@@ -76,14 +76,10 @@ wait_for_extract () {
wait
}
-format_bytes () {
- echo $@ | numfmt --to iec
-
-}
-
prompt_question () {
$NOCONFIRM && return 0
printf "$1 [Y/n] "
read response
[ "${var%${var#?}}"x != 'nx' ]
}
+
diff --git a/src/xi.sh b/src/xi.sh
index f63bfd7..b16a36e 100755
--- a/src/xi.sh
+++ b/src/xi.sh
@@ -67,15 +67,10 @@ ${BLUE}Available Commands:
${RED}Usage: xi [options] command...
EOF
}
-checkroot () {
- [ "$(id -u)" = "0" ] || {
- printf "${RED}Please run as root!\n"
- exit 1
- }
-}
[ -z "${LIBDIR}" ] && LIBDIR=/usr/lib/xipkg
+[ -f "/usr/lib/xilib.sh" ] && . /usr/lib/xilib.sh
[ -f ${LIBDIR}/VERSION ] && VERSION=$(cat ${LIBDIR}/VERSION) || VERSION=
export VERSION