-#! /bin/sh
+#!/bin/bash -noprofile
+
+####################################################################################
+# File : checkSize.sh
+# Created : Thu Dec 18 12:01:00 2002
+# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+# Project : SALOME
+# Module : Installation Wizard
+# Copyright : 2002-2008 CEA
#
-# The script checks available disk space. Returns 1 if there is no available space on the disc.
+# This script is the part of the SALOME installation procedure.
#
-# Usage: checkSize <directory> <required-size>
+# The script checks available disk space. Returns 1 if there is no available
+# space on the disc.
#
-# The script is the part of the SALOME PRO installation procedure.
+# Usage: checkSize <directory> <required-size>
#
-# Copyright : 2003 CEA/DEN, EDF R&D
####################################################################################
-var=`df -k "$1" | awk '{print $4}'`
+if [ $# -lt 2 ] ; then
+ echo "`basename $0` : wrong parameters"
+ exit 1
+fi
+var=`df -Pk "$1" | awk '{print $4}'`
for i in $var; do var=$i; done
if [ "$var" -lt "$2" ]; then
echo "Available disk space is $var Kb"