LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-30-2010, 10:31 AM   #1
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Bloomington, IL
Distribution: Bodhi
Posts: 309

Rep: Reputation: 33
Combining an archive and script file


Howdy,

So what I am looking to do is combine an archive and a script file. I would like to have a number of files compressed into an archive package and when a user double clicks on the package instead of having it open with the archive manager, instead have it run a shell script that is also packaged with the files.

This shell script will do a number of things including handling where the files are extracted to. Over all this would be similair to a self-extracting installer Windows users are used to using.

Can this be accomplished and if so mind pointing me in the right direction of what tool I should use to create something like this?

Regards,
~Jeff
 
Old 10-30-2010, 11:35 AM   #2
soppy
Member
 
Registered: Mar 2008
Location: In your head!
Distribution: Arch Linux
Posts: 165
Blog Entries: 1

Rep: Reputation: 28
I don't think this is possible without having some intervention on the outside in straight scripting. What you could do, is create a shell script that then reads some sort of file on the inside of the package that controls where everything goes. It is possible to create a program in C/C++ and package the items together, however you would need to change the actual source code every single time which can get cumbersome. With my first suggestion, you would only have to change one file and it wouldn't even be compiled. Hope I clarified.
 
Old 10-30-2010, 11:52 AM   #3
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Bloomington, IL
Distribution: Bodhi
Posts: 309

Original Poster
Rep: Reputation: 33
Hrm, thank you for your insight soppy - but I believe it is at least possible to do what I am asking. For instance take a look at the nvidia binary .run file driver. It contains an archive an a shell script - I just don't know how they put it all together!

Input?

~Jeff
 
Old 10-30-2010, 12:01 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,821

Rep: Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072
Ain't google wonderful... Looks like a good start and should be easy to modify for your needs.
http://www.linuxjournal.com/node/1005818

Last edited by michaelk; 10-30-2010 at 12:04 PM.
 
1 members found this post helpful.
Old 10-30-2010, 12:06 PM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
I don't exactly know what you want to do, but you can concatenate a script and an archive to make a self-extracting archive:
http://forum.codecall.net/linux-tuto...g-archive.html

Long ago I made some archives like this, but they're not that handy, mostly because it's a bit difficult to separate the script and archive once concatenated.
 
Old 10-30-2010, 12:12 PM   #6
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Bloomington, IL
Distribution: Bodhi
Posts: 309

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by michaelk View Post
Ain't google wonderful... Looks like a good start and should be easy to modify for your needs.
http://www.linuxjournal.com/node/1005818
That is exactly what I needed. What key words did you use? I searched around a bit but did not find this post.

Will start playing with this tonight.

Thanks!
~Jeff
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to archive logs christopher_m_bennett Linux - General 4 09-21-2009 08:56 AM
Automation Script !! Create automated archive of files based on name of file! yoshima Programming 5 09-28-2007 05:17 AM
Need a script for daily backup of oracle archive file sathyguy Linux - Newbie 15 01-22-2007 06:49 AM
How about a shell script archive? Autocross.US LQ Suggestions & Feedback 2 12-05-2006 06:36 PM
shell script - add file to archive ? xconspirisist Linux - Software 2 03-20-2004 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration