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...
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...
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):
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?
Otherwise, i hope this helps - thought this is not a release yet.
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)
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)
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)
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)
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)
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)
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)
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)
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)