Bash File
Sept 20, 2012 21:20:31 GMT 1
Post by konaexpress on Sept 20, 2012 21:20:31 GMT 1
Hey guys
I am trying to make a Bash file from Big-Bass's bash file that will download and make Bacon on any distro without the hug-inports.bac stuff. Any one out there good with Bash scripts? This is my first try at this.
Can this be copied into the path so that in the future I can just type get-bacon in the terminal and it will run?
Also not sure what the geometry stuff is but I assume it is needed for something.
Thanks for any help and let me know if I should/could add anything else to make it better.
-John
I am trying to make a Bash file from Big-Bass's bash file that will download and make Bacon on any distro without the hug-inports.bac stuff. Any one out there good with Bash scripts? This is my first try at this.
#!/bin/bash
# Joe Arose big_bass 12-14-2010 last update 11-1-2011
# John Michalek konaexpress 21-9-2012
# call this get-bacon
# auto download compile install
# so you can easily update when needed
# =====================================
# downoad ,compile and install BaCon
# =====================================
mkdir -p /usr/share/BaCon/old-version-saved
mkdir -p /usr/share/BaCon/
cd /usr/share/BaCon/
mv bacon.bash* bacon* hug.bac* hug_imports* bacon.lang* bacon.* /usr/share/BaCon/old-version-saved || true
# bacon.bash
xterm -geometry 40x30+150+40 -e wget http://www.basic-converter.org/stable/bacon.bash
chmod a+x bacon.bash
# bacon.bac
xterm -geometry 40x30+150+40 -e wget http://www.basic-converter.org/stable/bacon.bac
chmod a+x bacon.bac
# fix for bash if you have a different version you compiled
# use sed (#!/usr/bin/env bash change to #!/bin/bash)
sed -i 's/\#\!\/usr\/bin\/env bash/\#\!\/bin\/bash/' /usr/share/BaCon/bacon.bash
# to compile a fresh bacon binary
xterm -geometry 40x30+150+40 -e '. /usr/share/BaCon/bacon.bash bacon.bac'
# copy bacon bin into the path
cp bacon /usr/sbin
# hug.bac
xterm -geometry 40x30+150+40 -e wget http://www.basic-converter.org/hug.bac
# use the new bacon binary to make the new libhug.so
cp hug.bac libhug.bac
xterm -geometry 40x30+150+40 -e bacon -f libhug.bac
cp libhug.so /usr/lib
# bacon.lang
xterm -geometry 40x30+150+40 -e wget http://www.basic-converter.org/bacon.lang
Can this be copied into the path so that in the future I can just type get-bacon in the terminal and it will run?
Also not sure what the geometry stuff is but I assume it is needed for something.
Thanks for any help and let me know if I should/could add anything else to make it better.
-John