Megatest

checkspace.sh at [464391157a]
Login

File example/tests/checkspace/checkspace.sh artifact d63bf48441 part of check-in 464391157a


#!/bin/bash -e
diskpath=$1
spacereq=$2
freespace=`df -k $diskpath | grep $diskpath | awk '{print $4}'`
if [[ $freespace -lt $spacereq ]];then
  echo "ERROR: insufficient space on $diskpath"
  exit 1
else
  echo "There is adequate space on $diskpath"
fi