blob: b8a35207c30d6ae51b1104308178571f1654fec0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
#
# Date: 2009-12-16
# Author: Ole Kristian Lien
# License: GNU General Public License
#
# Check for free space needed to work with video-file
DISK=`df \`pwd\` | tail -1 | awk '{print $4}'`
FILE=`du $1 | awk '{print $1}'`
if [ -z "$1" ]; then
echo "Usage: $0 <file>"
exit 1
fi
echo -n " * Checking for enough disk space to continue..."
if [ $DISK -le $FILE ]; then
echo "Error: Not enough disk space to continue! Aborting."
exit 1
fi
echo -e "OK!"
|