LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 06-24-2003, 07:32 PM   #1
LinuxBAH
Member
 
Registered: Jun 2003
Distribution: FreeBSD
Posts: 119

Rep: Reputation: 15
Script files and global commands...


I want to construct a script file that auto ./configure , make, make check, make install, make clean's. I still have to do some research on this but I was curious... I found a thread that gave an example of making a command, I would think it was global.. the format was

alias CommandName="What you want it to do here"
and then I would just place this code within ~/.bashrc. Now would it be easier to do like I want and make a sript file and somehow place it on this line and make a call to it? If so would just placing the file path/name within the " " work? If not how would I go about seperating each command within that line of code?

ie. alias inst="./configure * make * make check * make install * make clean"

Where * is the seperator used to run each as a command

Any ideas?
 
Old 06-24-2003, 07:38 PM   #2
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
easy :
./configure && make && make install
&& stop the script if there's an error.

call the textfile "inst" make it executable and put it whatever you want, just be sure the folder is in your path (to add it, add it to user profile in .bash.rc or .profile in their home or change the global profile in /etc/profile. just add a line like PATH="$PATH:/where/you/want")
 
Old 06-24-2003, 07:38 PM   #3
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
do you mean like putting the && between commands?
such as ./configure && make
 
Old 06-24-2003, 07:38 PM   #4
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
hehh looks like someone got to it before me
 
Old 06-24-2003, 08:04 PM   #5
LinuxBAH
Member
 
Registered: Jun 2003
Distribution: FreeBSD
Posts: 119

Original Poster
Rep: Reputation: 15
Lol Dr0zz.. appreciate the feedback guys. I'm gonna give this a shot. When you said you want me to make a text file Half_Elf, you meant inst.txt right?
 
Old 06-24-2003, 08:19 PM   #6
LinuxBAH
Member
 
Registered: Jun 2003
Distribution: FreeBSD
Posts: 119

Original Poster
Rep: Reputation: 15
I put
#inst command path

PATH="$PATH:/home/ghost/bin/"

inside of /etc/profile but when I goto the prompt and type inst it says bash: inst: command not found.. what did I do wrong?

Last edited by LinuxBAH; 06-24-2003 at 08:21 PM.
 
Old 06-25-2003, 12:38 AM   #7
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
you have to logout/login to make it work (you can also type source /etc/profile)
by a text file, I mean a file... anything that is unknow is "text" under linux, no need to put the .txt.
 
  


Reply



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
"global commands" in linux Peleus Linux - Newbie 22 11-10-2005 12:53 AM
How do I script these commands? johnnybhoy67 Linux - General 6 10-21-2005 09:53 AM
Script to Run the Same Commands on a List of Files Chryzmo Programming 1 10-03-2004 08:34 AM
making a script 'global' fatherg Linux - General 3 08-08-2004 07:40 AM
How make a script in order to set global alias? RickHunter_Ve Linux - Newbie 7 06-08-2004 02:13 PM

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

All times are GMT -5. The time now is 05:57 AM.

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
Open Source Consulting | Domain Registration