diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-01-10 16:16:44 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-01-10 16:16:44 +0100 |
commit | cfc200714ddfa6d76feb836c258b1135d91a8348 (patch) | |
tree | ecc4628fc161de5044c9acb03bb63b2fd48ae75c /package/base-files/extra/sbin/update | |
parent | 77bdac14df2e20b290cdd4bcad0ecb0e1fc446be (diff) | |
parent | 91c8ff1c3f772e0ae8d7c60a3252c5efced9fe92 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Conflicts:
package/digitemp/Makefile
Diffstat (limited to 'package/base-files/extra/sbin/update')
-rwxr-xr-x | package/base-files/extra/sbin/update | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/package/base-files/extra/sbin/update b/package/base-files/extra/sbin/update index 0cd4ee713..c51962f5b 100755 --- a/package/base-files/extra/sbin/update +++ b/package/base-files/extra/sbin/update @@ -6,6 +6,11 @@ if [ $who -ne 0 ]; then exit 1 fi +if [ -x /sbin/mtd ];then + updatecmd="mtd -r write - linux" +else + updatecmd="gunzip -c | tar -xf -" +fi check_exit() { if [ $? -ne 0 ];then @@ -22,19 +27,19 @@ prepare() { extract_from_file() { prepare - cat $1 | gunzip -c | tar -xf - + cat $1 | $updatecmd check_exit } extract_from_ssh() { prepare - ssh $1 "cat $2" | gunzip -c | tar -xf - + ssh $1 "cat $2" | $updatecmd check_exit } extract_from_http() { prepare - wget -O - $1 | gunzip -c | tar -xf - + wget -O - $1 | $updatecmd check_exit } |