From: akl Date: Fri, 27 Jul 2007 13:43:20 +0000 (+0000) Subject: Script to get available disk space by the given directory that selected by user. X-Git-Tag: IMP_BR_4~54 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=47d7004f6a85391e06a566640d041bcc08f45e6e;p=tools%2Finstall.git Script to get available disk space by the given directory that selected by user. --- diff --git a/config_files/diskSpace.sh b/config_files/diskSpace.sh new file mode 100755 index 0000000..12812cf --- /dev/null +++ b/config_files/diskSpace.sh @@ -0,0 +1,26 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : diskSpace.sh +# Created : Mon Jun 25 17:09:00 2007 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2007 CEA +# +# This script is the part of the SALOME installation procedure. +# +# The script returns available disk space. +# +# Usage: diskSpace +# +#################################################################################### + +if [ $# -lt 1 ] ; then + echo "`basename $0` : wrong parameters" + exit 1 +fi +var=`df -k "$1" | awk '{print $4}'` +for i in $var; do var=$i; done +echo $var +exit 0