Tips to make scripts install


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Tips to make scripts install
# 1  
Old 07-19-2011
Tips to make scripts install

Hi,

I have a series of BASH shell scripts that I would like to package and distribute. I would like to make it as easy as possible users to install the package on their system.

The only tasks that need to be performed for installation are 1) unzip the package, 2) modify the user's ~/.bashrc config file, and 3) make the scripts executable.

I have written an install script that will accomplish steps 2 and 3. However, users still have to unzip the package, make the install script executable, and execute the install script. This seems a bit sloppy to me.

Any tips regarding the installation of scripts would be appreciated. Of course I am a fan this process on say OS X, where you download a package, double click on it, and then are led through the installation process. I understand however that I am more limited regarding bash.

My ultimate solution would involve the user issuing just 1 command, which would accomplish steps 1 - 3 above. However, any advice about how to distribute scripts that maintain file permissions (ie. executable) would be welcomed too.

Thanks!

Mike
# 2  
Old 07-19-2011
Quote:
Originally Posted by msb65
The only tasks that need to be performed for installation are 1) unzip the package, 2) modify the user's ~/.bashrc config file, and 3) make the scripts executable.

I have written an install script that will accomplish steps 2 and 3. However, users still have to unzip the package, make the install script executable, and execute the install script. This seems a bit sloppy to me.
Make it a tar, cpio, or other kind of UNIX archive instead of a zip. Permissions are preserved in those, including executable bits.

Include an installer script, like so:

Code:
#!/bin/bash

if grep -q "###APPNAME###" ~/.bashrc
then
        echo "Application is already installed in your bashrc"
        exit 1
fi

cat >>~/.bashrc <<EOF
/path/to/application ###APPNAME###
EOF

echo "Application now installed in your bashrc!"

Have users run it from shell. Two steps instead of one, to be sure, but sysadmins will thank you for a package which doesn't mangle login scripts unless asked.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Fedora

Make check install and make all install

hi dear i want to know what is different between make check install and make all install? thanks in advane fereshte (3 Replies)
Discussion started by: komijani
3 Replies

2. UNIX for Advanced & Expert Users

How to make the variables of one script available for the other scripts?

Hello Everyone, I want to know how can we make the variables of one script available for the other script? for example i have three scripts variable_availability.sh,first.sh,second.sh and a file containing variables called common ---------------------------------- cat variable_availability.sh... (2 Replies)
Discussion started by: Kesavan
2 Replies

3. UNIX for Dummies Questions & Answers

make 3.82 install help

Hello. This is what I get when I try to install Todd-Sheppards-Computer:~/make-3.82 toddsheppard$ sudo make install Password: Making install in glob make: Nothing to be done for `install-exec-am'. make: Nothing to be done for `install-data-am'. Making install in config make: Nothing to be... (3 Replies)
Discussion started by: 240shep19
3 Replies

4. UNIX for Dummies Questions & Answers

Just asking - Tips on how to maintain your scripts ..

Hi all, Just writing to ask if any one can advise on what tools to use best for maintaining your scripts ... preferably free/open source and portable if there is one, that is, one that can be placed and run on a USB stick ... At the moment, am having them in directories and files and no... (2 Replies)
Discussion started by: newbie_01
2 Replies

5. UNIX for Dummies Questions & Answers

Difference between configure/make/make install.

Hi, While installation of apache on linux, we perform the below tasks. 1) Untar 2) configure 3) make 4) make install. I wanted to understand the difference and working of configure/make/make install. Can any one help me understanding this? Thanks in advance. (1 Reply)
Discussion started by: praveen_b744
1 Replies

6. Solaris

Gani Network Driver Won't Install - make: Fatal error: Don't know how to make targ...

I attached a README file that I will refer to. I successfully completed everything in the README file until step 4. # pwd /gani/gani-2.4.4 # ls COPYING Makefile.macros gem.c Makefile Makefile.sparc_gcc gem.h Makefile.amd64_gcc ... (1 Reply)
Discussion started by: Bradj47
1 Replies

7. Linux

Error in issuing a make and make install

Hi, Recently I install a package and try to do a make and make install. However, in the make it gives me below error:- make:Nothing to be done for 'install-exec-am' make:Nothing to be done for 'install-data-am' Can anyone please explain to me what does this mean? I have been trying... (1 Reply)
Discussion started by: ahjiefreak
1 Replies

8. Shell Programming and Scripting

is there any way to make flat file from some of scripts ?

Hello is there any way to if lets say i have main.pl script , but i have 3 includes in this perl script now i will like to some how to treat this main.pl and its includes files as single file something like -E (Preprocess only; do not compile, assemble or link) in the c compilers . in short i... (0 Replies)
Discussion started by: umen
0 Replies

9. UNIX for Dummies Questions & Answers

make and make install commands

Hi there, I am installing a package at the moment on to my Solaris version 8 and I have run into a problem with the 'make' command. I have installed the package using the 'pkgadd' command and I am now at the stage where I have to use the 'make' command followed by the 'make install'... (4 Replies)
Discussion started by: gerwhelan
4 Replies

10. UNIX for Dummies Questions & Answers

Regarding Make Scripts

Hi I'm well worsed in Shell Scripting on UNIX OS. But I found the script used in Make file for compiling the unix sources is quite criptic. Even though it looks some what like any other Shell Script, but I noticed lots of difference & I'm always facing difficult in understanding the code... (5 Replies)
Discussion started by: S.Vishwanath
5 Replies
Login or Register to Ask a Question