]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Script to get available disk space by the given directory that selected by user.
authorakl <akl@opencascade.com>
Fri, 27 Jul 2007 13:43:20 +0000 (13:43 +0000)
committerakl <akl@opencascade.com>
Fri, 27 Jul 2007 13:43:20 +0000 (13:43 +0000)
config_files/diskSpace.sh [new file with mode: 0755]

diff --git a/config_files/diskSpace.sh b/config_files/diskSpace.sh
new file mode 100755 (executable)
index 0000000..12812cf
--- /dev/null
@@ -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 <directory>
+#
+####################################################################################
+
+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