mirror of
https://github.com/chubin/cheat.sh.git
synced 2026-06-20 13:16:44 +02:00
cht.sh: minor fixes
This commit is contained in:
+2
-2
@@ -155,7 +155,7 @@ EOF
|
||||
fi
|
||||
|
||||
local space_needed=700
|
||||
local space_available; space_available=$(("$(df -k "$installdir" | awk '{print $4}' | tail -1)"/1024))
|
||||
local space_available; space_available=$(($(df -k "$installdir" | awk '{print $4}' | tail -1)/1024))
|
||||
|
||||
if [ "$space_available" -lt "$space_needed" ]; then
|
||||
echo "ERROR: Installation directory has no enough space (needed: ${space_needed}M, available: ${space_available}M"
|
||||
@@ -212,7 +212,7 @@ EOF
|
||||
else
|
||||
printf "\033[0;31m%s\033[0m\n" "FAILED"
|
||||
echo "Some tests were failed. Run the tests manually for further investigation:"
|
||||
echo " cd $PWD; bash tests/run-tests.sh)"
|
||||
echo " cd $PWD; bash run-tests.sh)"
|
||||
fi
|
||||
)
|
||||
|
||||
|
||||
+2
-2
@@ -155,7 +155,7 @@ EOF
|
||||
fi
|
||||
|
||||
local space_needed=700
|
||||
local space_available; space_available=$(("$(df -k "$installdir" | awk '{print $4}' | tail -1)"/1024))
|
||||
local space_available; space_available=$(($(df -k "$installdir" | awk '{print $4}' | tail -1)/1024))
|
||||
|
||||
if [ "$space_available" -lt "$space_needed" ]; then
|
||||
echo "ERROR: Installation directory has no enough space (needed: ${space_needed}M, available: ${space_available}M"
|
||||
@@ -380,7 +380,7 @@ if [ "$CHTSH_MODE" = auto ] && [ -d "$CHEATSH_INSTALLATION" ]; then
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
local url; url="$1"; shift
|
||||
"$CHEATSH_INSTALLATION/ve/bin/python" "$CHEATSH_INSTALLATION/lib/standalone.py" "${url#"$CHTSH_URL"}" "$@"
|
||||
PYTHONIOENCODING=UTF-8 "$CHEATSH_INSTALLATION/ve/bin/python" "$CHEATSH_INSTALLATION/lib/standalone.py" "${url#"$CHTSH_URL"}" "$@"
|
||||
}
|
||||
elif [ "$(uname -s)" = OpenBSD ] && [ -x /usr/bin/ftp ]; then
|
||||
# any better test not involving either OS matching or actual query?
|
||||
|
||||
Reference in New Issue
Block a user