author | zecke <zecke> | 2004-08-14 12:05:39 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-08-14 12:05:39 (UTC) |
commit | 3df06db9e6fd268c7d234be05b01a2303dc0f7ba (patch) (unidiff) | |
tree | 6a642674a0a69729c207337e63e20b8e02f40ec4 /noncore/tools/opie-sh/scripts/diskfree.sh | |
parent | 7cee03c63afadac76e87e276a5ef7b1bba27847b (diff) | |
download | opie-3df06db9e6fd268c7d234be05b01a2303dc0f7ba.zip opie-3df06db9e6fd268c7d234be05b01a2303dc0f7ba.tar.gz opie-3df06db9e6fd268c7d234be05b01a2303dc0f7ba.tar.bz2 |
Do not hardcode /opt/QtPalmtop but use $OPIEDIR
Diffstat (limited to 'noncore/tools/opie-sh/scripts/diskfree.sh') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/tools/opie-sh/scripts/diskfree.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/tools/opie-sh/scripts/diskfree.sh b/noncore/tools/opie-sh/scripts/diskfree.sh index 78415e3..0f17f15 100755 --- a/noncore/tools/opie-sh/scripts/diskfree.sh +++ b/noncore/tools/opie-sh/scripts/diskfree.sh | |||
@@ -1,44 +1,44 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | # diskfree.sh - a demonstration of opie-sh | 3 | # diskfree.sh - a demonstration of opie-sh |
4 | # | 4 | # |
5 | # Copyright (C) 2002 gonz@directbox.com | 5 | # Copyright (C) 2002 gonz@directbox.com |
6 | # | 6 | # |
7 | # This program is free software; you can redistribute it and/or modify | 7 | # This program is free software; you can redistribute it and/or modify |
8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU General Public License as published by |
9 | # the Free Software Foundation; either version 2, or (at your option) | 9 | # the Free Software Foundation; either version 2, or (at your option) |
10 | # any later version. | 10 | # any later version. |
11 | # | 11 | # |
12 | # This program is distributed in the hope that it will be useful, | 12 | # This program is distributed in the hope that it will be useful, |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | # GNU General Public License for more details. | 15 | # GNU General Public License for more details. |
16 | # | 16 | # |
17 | # 20020524-5 - bugfix | 17 | # 20020524-5 - bugfix |
18 | # 20020524-1 - initial release | 18 | # 20020524-1 - initial release |
19 | 19 | ||
20 | OPIE_SH=/opt/QtPalmtop/bin/opie-sh | 20 | OPIE_SH=$OPIEDIR/bin/opie-sh |
21 | 21 | ||
22 | # there must be a better way to do this with sed, but i had no time | 22 | # there must be a better way to do this with sed, but i had no time |
23 | # time to look into this yet... | 23 | # time to look into this yet... |
24 | 24 | ||
25 | ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/fsmounter.png>" | 25 | ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/fsmounter.png>" |
26 | echo "<h3>diskfree</h3> how much space is left ?<br>" | 26 | echo "<h3>diskfree</h3> how much space is left ?<br>" |
27 | echo "<p><table>" | 27 | echo "<p><table>" |
28 | 28 | ||
29 | df -h \ | 29 | df -h \ |
30 | | grep -v "Mounted on" \ | 30 | | grep -v "Mounted on" \ |
31 | | sed 's/ / /g' \ | 31 | | sed 's/ / /g' \ |
32 | | sed 's/ / /g' \ | 32 | | sed 's/ / /g' \ |
33 | | sed 's/ / /g' \ | 33 | | sed 's/ / /g' \ |
34 | | sed 's/ / /g' \ | 34 | | sed 's/ / /g' \ |
35 | | sed 's/ / /g' \ | 35 | | sed 's/ / /g' \ |
36 | | sed 's/ / /g' \ | 36 | | sed 's/ / /g' \ |
37 | | sed "s/ / /g" \ | 37 | | sed "s/ / /g" \ |
38 | | cut -d " " -f4- \ | 38 | | cut -d " " -f4- \ |
39 | | sed 's/ /<\/td><td>/g' \ | 39 | | sed 's/ /<\/td><td>/g' \ |
40 | | sed 's/$/<\/td><\/tr>/' \ | 40 | | sed 's/$/<\/td><\/tr>/' \ |
41 | | sed 's/^/<tr><td>/' ; echo "</table>" \ | 41 | | sed 's/^/<tr><td>/' ; echo "</table>" \ |
42 | ) | $OPIE_SH -t "Space left" -f | 42 | ) | $OPIE_SH -t "Space left" -f |
43 | 43 | ||
44 | rm -f /tmp/qcop-msg-diskfree.sh | 44 | rm -f /tmp/qcop-msg-diskfree.sh |