LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   embed userdata in update.zip and extract to folder during install (https://www.linuxquestions.org/questions/linux-newbie-8/embed-userdata-in-update-zip-and-extract-to-folder-during-install-4175510560/)

graemekean 07-09-2014 05:37 AM

embed userdata in update.zip and extract to folder during install
 
Hi guys - total noob to linux here.
I've been playing around with a linux update for XBMC on a matricom mx2 tv box. I've learned how to unpack the update - unsquashfs the usr.sqsh file (and re-squash) and finally how to re-pack and sign the update.zip.
I have been playing around with the updater-script but I don't really have a good idea how this update works.
Basically I would like to embed a folder called userdata into the update and extract that data upon install into a selected folder.
I'm sure this is a simple task, but I'm not even sure where such a command would be placed (in the updater-script?).
Any help you guys can give would be greatly appreciated - it's taking me ages to make quick changes - repack and sign - then load onto the box to test - and I'm getting nowhere fast.
Thanks in anticipation.
G.

graemekean 07-11-2014 08:43 AM

Am I looking in the wrong place?
 
Wow guys - I thought this was a total noob question but I haven't had a single response yet.
I can only assume that I am looking in the wrong place - perhaps this cannot be achieved through knowledge of linux?
If any of you guys can point me in the direction of where I might find an answer to this one it would be greatly appreciated.

Thanks in anticipation.

G.

schneidz 07-11-2014 09:26 AM

this is what i am getting:
Code:

[schneidz@hyper ~]$ uname -a
Linux hyper 2.6.43.8-1.fc15.x86_64 #1 SMP Mon Jun 4 20:33:44 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
[schneidz@hyper ~]$ updater-script
bash: updater-script: command not found...

seems to be like some specific software you are trying to install/modify. have you asked over at the xbmc forums (since they wrote it some developer over there can probably provides hints of how to modify it).

this is not a generic linux thing that is normal.


generically speaking, this is how one would add a file to a zip-file:
Code:

[schneidz@hyper temp]$ unzip -l userdata.zip
Archive:  userdata.zip
  Length      Date    Time    Name
---------  ---------- -----  ----
      12  07-11-2014 10:28  1.txt
      12  07-11-2014 10:28  2.txt
---------                    -------
      24                    2 files
[schneidz@hyper temp]$ zip userdata 3.txt
  adding: 3.txt (stored 0%)
[schneidz@hyper temp]$ unzip -l userdata.zip
Archive:  userdata.zip
  Length      Date    Time    Name
---------  ---------- -----  ----
      12  07-11-2014 10:28  1.txt
      12  07-11-2014 10:28  2.txt
      14  07-11-2014 10:29  3.txt
---------                    -------
      38                    3 files



All times are GMT -5. The time now is 10:53 AM.