Why not caching it, then installing it from cache? Also, and maybe this is just me, but I would probably do some checking in the shell script to verify it installed before it deletes the file. BASH has built in functions for this.
app_list=(
/full/path/to/app1
/full/path/to/app2
)
for file in ${app_list} , do
if [[ -e ${file} ]]
then rm -rf /path/to/installers
else echo "installer did not install apps, exiting..."
exit1
fi
done
exit 0
If I needed to run the install again I'd likely copy things back down. I don't have bandwidth issues, stuff is only allowed to run while on the local network, and I am for sure not good at the scripting like some other people. This is why we post here, right? So others can improve upon others. So thanks, Tom!
I could install from cacheā¦either way I guess on that one, has to install from somewhere.
Craig E
I've been reading my expensive O'Reilly book on the BASH shell
again....saw this and it reminded me of built in functions BASH has. I
first learned this the hard way when writing an uninstaller script for
ARD Admin. Someone pointed out to me to verify if the file is even
there before removing other files to reinstall ARD Admin on a remote
client. I had to come back to work yesterday and no one else comes
back from winter break until Thursday. So I am bored, hahaha send me
anything you want help scripting with with in the next day and I can
gladly help you out.
The install from cache thing just popped up in my head, because I use
that to install text books. Since my user base is mostly laptops,
during larger installs users can shut their lids, turn off their
computer, or even walk out of wifi range with it. So, my environment is
a bit tricky at times. I have about 5 to 6 gigs of digital text books
with exercises and I cache out all packages. Then I have a start up
policy that runs globally on every client that installs all apps/items
from cache. That way, if they close their lid or whatnot they will
pick up caching it out the next time it checks in. Then once it is
finished the next time they reboot, they get the package.
I think next year I will migrate the digital text books into the images
as it is quite a pain to try to figure out what students need what since
not all of them take the same classes. I would have used self service
but I still get the random blank screen on clients that I am not sure
what is causing it. I mean it is completely random and intermittent and
the same client will work if you hit refresh enough times.
Which book(s) do you have?
http://search.oreilly.com/?i=1&q=bash&t1=Books&u1=q&u2=t1&facet=ContentType&act=fc_contenttype_Books
And do you recommend them/it over
http://tldp.org/LDP/Bash-Beginners-Guide/html/
&
http://tldp.org/LDP/abs/html/
I must admit that I have not read through the above guides but I do use them
for reference.
Ryan M. Manly
Glenbrook High Schools
p.s. This guy's wiki is great too, esp. the BashPitfalls page
http://mywiki.wooledge.org/CategoryShell
Well for reference, this is the book I own:
http://oreilly.com/catalog/9780596009656/
I also use those sites as well for quick reference but I find the book
a more structured learning experience. The book is more like a class
room and those websites are more like instruction manuals. Both are
great, but I think the book has more of a structured road map to it. I
like to read a chapter with a terminal window open and type all the
command examples as I read them in the book. The book will then later
use those commands/functions to explain something else and it all sort
of ties in together.
Also, I watch all the Google code videos on Youtube which are great,
and I found this gem for python:
http://www.thenewboston.com/?cat=40
Also, if your company springs for a Lynda.com account, man you will get
access to tons of great instructional videos. I had an account
(training budget got nixed) and I instantly got 12 hours of
instructional videos on how to program with Ruby. I am not sure what
an enterprise license for lynda.com costs, but I think you should be ale
to justify the subscription to your employer since they come out with
new content all the time, and it is all done very well. Plus it is a
pretty cheap way to train all your employees as well.
http://www.lynda.com/
-Tom
A belated "me too" to Robert...this works like a charm. Would be nice to see a JAMF diff for iLife '11.
Don