[Slim-Checkins] r33815 - /7.7/trunk/platforms/readynas/tools/bin2tar.sh
[email protected] Tue, 07 Feb 2012 13:35:40 -0000
| Newsgroups | gmane.music.equipment.slimdevices.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mherger
Date: Tue Feb 7 05:35:40 2012
New Revision: 33815
URL: http://svn.slimdevices.com/slim?rev=33815&view=rev
Log:
Bug: n/a
Description: add tool extract the tarball from a ReadyNAS add-on
Added:
7.7/trunk/platforms/readynas/tools/bin2tar.sh
Added: 7.7/trunk/platforms/readynas/tools/bin2tar.sh
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/tools/bin2tar.sh?rev=33815&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/tools/bin2tar.sh (added)
+++ 7.7/trunk/platforms/readynas/tools/bin2tar.sh Tue Feb 7 05:35:40 2012
@@ -1,0 +1,18 @@
+#!/bin/bash
+
+# extract the tarball from a ReadyNAS .bin addon
+
+ARCH=`uname -m`
+if [ "${ARCH}" == "padre" ]; then
+ BSIZE=512
+else
+ BSIZE=16384
+fi
+
+if [ -f $1 ]; then
+ TFIL=`basename $1 .bin`
+ TFIL="${TFIL}.tar"
+ dd if=$1 of=${TFIL} bs=${BSIZE} skip=1
+else
+ echo "Add-on file doesn't exist"
+fi