Merge lp:~cwayne/project-rootstock-ng/mimes into lp:~ogra/project-rootstock-ng/trunk

Proposed by Chris Wayne
Status: Merged
Merged at revision: 31
Proposed branch: lp:~cwayne/project-rootstock-ng/mimes
Merge into: lp:~ogra/project-rootstock-ng/trunk
Diff against target: 45 lines (+19/-5)
1 file modified
rootstock-touch-install (+19/-5)
To merge this branch: bzr merge lp:~cwayne/project-rootstock-ng/mimes
Reviewer Review Type Date Requested Status
Oliver Grawert Pending
Review via email: mp+206788@code.launchpad.net

Description of the change

Allow for the rootfs tar to be mimetype application/x-gzip too

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'rootstock-touch-install'
--- rootstock-touch-install 2014-02-17 14:26:46 +0000
+++ rootstock-touch-install 2014-02-17 18:48:10 +0000
@@ -90,16 +90,30 @@
9090
91TARBALL=$(basename $TARPATH)91TARBALL=$(basename $TARPATH)
9292
93if [ -z "$TARBALL" ] || [ -z "$SYSIMG" ] || \93if [ -z "$TARBALL" ]; then
94 [ "$(file --mime-type $TARPATH|sed 's/^.* //')" != "application/gzip" ] || \94 echo "need valid rootfs tarball path"
95 usage
96fi
97
98TARTYPE=$(file --mime-type $TARPATH|sed 's/^.* //')
99case ${TARTYPE#application\/} in
100 gzip|x-gzip)
101 ;;
102 *)
103 echo "Need valid rootfs tarball gzip type"
104 usage
105 ;;
106esac
107
108if [ -z "$SYSIMG" ] || \
95 [ "$(file --mime-type $SYSIMG|sed 's/^.* //')" != "application/octet-stream" ]; then109 [ "$(file --mime-type $SYSIMG|sed 's/^.* //')" != "application/octet-stream" ]; then
96 echo "need valid tarball and system.img paths"110 echo "need valid system.img path and type application/octet-stream"
97 usage111 usage
98fi112fi
99113
100if [ ! -z $CUST_TARPATH ] && \114if [ ! -z $CUST_TARPATH ] && \
101 [ "$(file --mime-type $CUST_TARPATH|sed 's/^.* //')" != "application/x-xz" ]; then115 [ "$(file --mime-type $CUST_TARPATH|sed 's/^.* //')" != "application/x-xz" ]; then
102 echo "Custom tarball needs to be .tar.xz"116 echo "Custom tarball needs to be valid path and type .tar.xz"
103 usage117 usage
104fi118fi
105119
@@ -167,4 +181,4 @@
167echo "[done]"181echo "[done]"
168182
169echo "rebooting device"183echo "rebooting device"
170adb reboot184adb reboot
171\ No newline at end of file185\ No newline at end of file

Subscribers

People subscribed via source and target branches