Distributing script projects, suggestions/ideas?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Distributing script projects, suggestions/ideas?
# 1  
Old 09-09-2015
Distributing script projects, suggestions/ideas?

Heyas

If you recall, not too long ago, i was asking about the GNU Autotools. The feedback on that was almost unisense, and me figured that it turned my (back then) +98% SHELL project into a +73% GROFF project... Smilie
Felt a bit overhelmed, specialy since i didnt actualy use or need the true purpose of those tools....

But it sure helped me lots understanding the whole installation process (a little bit) better.
Eventually i thought i could write my own 'installer' (aka configure) script -> YASSI -> Yet Another Simple Script Installer.
The help screen will look quite familiar... Smilie

For basic installations, one runs ./configure [--prefix=/usr] which generates:
  • make-install
  • make-uninstall
  • make-distclean

A basic installation of a small script based project could look as simple as (in the configure.cfg):
Code:
APP=my-script
BINDIR=myscript.sh
MAN1DIR=man/*1
DOCDIR="README.md docs/LICENSE"
DATADIR=./data_subdir

For more complex projects, one could use doRef=true to get the dirs used by the project saved to: <PREFIX>/<SYSCONFDIR>/<APP>.conf (defaults: [/usr{/local}]/etc or $HOME/.local/etc)
So within your project, you just need to figure that single file, to get all your default/used directories.

However, for more tweaking i've added some arrays that are parsed at different times.
  • PREPARE is run during ./configure, so its actions are applied to ./configure --tarball --prefix=/usr
  • PRIOR is run before the actual install, during ./make-install
  • POST is run after the actual install, during ./make-install
  • CLEAN is run during ./make-distclean, and should be used to remove files from PREPARE
  • REMOVE is run during ./make-uninstall, and should be used to remove files from PRIOR
  • IGNORE is run during ./configure --tarball, and should be used to share the prepared project with family or friends.
For obvious reasons, it supplies 2 samples, a default one and a full one (with my own preferences, to illustrate what is possible).

I wonder if you would have any further thoughts or ideas? Smilie
Otherwise, i hope this helps - thought this is not a release yet.

Thank you

EDIT:
Sorry, i've already had a thread on it... Simple (un-)installation of scripts using YASSI
@Mod: Mind merging?

Last edited by sea; 09-09-2015 at 02:22 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need ideas in shell script

Hi Gurus, I need a simple logic idea what can be done in the below shell script. I written a script to do a automated maintenance work on every month of 15th and I have scheduled it through the crontab. I need to send an alert email to the user before 24 hrs of that maintenance script run.... (5 Replies)
Discussion started by: ramkumar15
5 Replies

2. Shell Programming and Scripting

Suggestions on this script please

i=1 out="" j=`expr 2 * $1` while do out="$out"#"" echo $out ((i=i+1)) done while do print ${out%?} ((i=i+1)) done This script is throwing an error: gurnish:/home/fnb/gurnish/saurabh/scripts> while1 3 expr: 0402-050 Syntax error. # (6 Replies)
Discussion started by: targetshell
6 Replies

3. Shell Programming and Scripting

BASH script problem using find, ideas?

Hi, I'm trying to write a script to search through my computer and find all .jpg files and put them all in a directory. So far I have this: for i in `find /home -name '*.jpg' ` ; do mv $i home/allen/Pictures/PicturesFound ; done When I run it, I get this error (this is only part of it, it... (2 Replies)
Discussion started by: FortressPTH
2 Replies

4. Shell Programming and Scripting

Distributing a perl script

Hi all, I'm new to the world of Perl so may have gone about this in the wrong way (my background is mainly Java and Bash). I have a Perl script (gallery.pl) which takes in various arguments (the only mandatory arguments is a directory full of images) and creates an HTML, standards compliant... (1 Reply)
Discussion started by: forquare
1 Replies

5. Shell Programming and Scripting

Suggestions/cleanup Bash script

Hello, beginner bash scripter here.. I was able to write a script and it works just fine. I'm just wondering if someone could chime in or any suggestions to make it cleaner or tighter so to speak. I have a disk to disk backup solution which uses 250GB disks. When one gets full I just po in a new... (7 Replies)
Discussion started by: woodson2
7 Replies

6. Shell Programming and Scripting

Opinions/Ideas/Suggestions needed

I'm currently developing a script to clean out certain directories based on age and name. Part of the assignment is to ensure that the cleaning of a directory is done under the user id of the owner (script is running as root). I have a few ideas on how to do this, but I'd like to hear your... (3 Replies)
Discussion started by: pludi
3 Replies

7. Shell Programming and Scripting

Need suggestions about a datecheck script

I'm currently running a script that checks to see if a laptop is on the network, and if it is it backs up, if not it retries it later. Anyway, our backup scheduling has changed. I need to check if today's date is the Thursday after the first Wednesday of every month. This is made slightly more... (5 Replies)
Discussion started by: tsmurray
5 Replies

8. Shell Programming and Scripting

syntex error script any suggestions

a script with prompts user and returns the value of there home directory and full name #!/bin/bash echo "please enter your login ID" read login_id while $login_id -ne `grep $login_id /etc/passwd | cut -f1 -d:` is they anything wrong with it (5 Replies)
Discussion started by: kim187
5 Replies

9. Shell Programming and Scripting

what is uses of unix shell script in database projects

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (2 Replies)
Discussion started by: alokjyotibal
2 Replies

10. Shell Programming and Scripting

ideas for perl script - strings,conditionals..etc

I have a matrix , how do I compare all the elements of a column , lets say I want to check if the columns contain the alphabets "S","H","A","R","A","T". and not "X"s. Lets say matrix looks something like this .. SSSXSH HHXXHA AAXXAT RRRXRS AAXTAR TTTTTA I can hard code it where... (4 Replies)
Discussion started by: sharatz83
4 Replies
Login or Register to Ask a Question