3 # this is the feisty meow host preparation script. it installs all the packages required to run and build feisty meow scripts and applications.
4 # this script may still be a bit incomplete; we definitely use a lot of unix and linux tools in different scripts.
6 # preconditions and dependencies--this script itself depends on:
13 # something borrowed...
14 function exit_on_error() {
16 echo -e "\n\nan important action failed and this script will stop:\n\n$*\n\n*** Exiting script..."
24 # load feisty meow environment here, but first test that we *can* load it.
26 #hmmm: currently, this script needs the system to have already been configured?
27 # that's the implication of calling launch_feisty...
28 # can we find that same bootstrapping code that will reconfigure first?
30 # hmmm: we need clean starty type approach! must not expect feisty to already be configured for use!
31 # e.g.?? $ bash /opt/feistymeow.org/feisty_meow/scripts/core/reconfigure_feisty_meow.sh
32 # hmmm: above ALSO ESSENTIAL TO GET RIGHT!
34 PHASE_MESSAGE="Checking integrity of Feisty Meow subsystem"
35 if [ -z $FEISTY_MEOW_APEX ]; then
36 false; exit_on_error $PHASE_MESSAGE
39 # simple brute force check. can we go there?
40 pushd $FEISTY_MEOW_APEX &> /dev/null
41 exit_on_error locating feisty meow top-level folder
44 # now ask feisty if it's there; should work as long as our scripts are in place.
45 bash $FEISTY_MEOW_APEX/scripts/core/is_feisty_up.sh
46 exit_on_error $PHASE_MESSAGE
49 #hmmm: this will currently fail if reconfigure has never been called.
50 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
54 # first the crucial bits for scripts to work...
56 PHASE_MESSAGE="installing perl file and diff modules"
58 # ubuntu or debian or other apt-based OSes...
59 if whichable apt; then
60 sudo apt install libfile-which-perl libtext-diff-perl
61 exit_on_error $PHASE_MESSAGE
62 # rpm based with yum available...
63 elif whichable yum; then
64 sudo yum install perl-File-Which perl-Text-Diff
65 exit_on_error $PHASE_MESSAGE
67 elif [ ! -z "$IS_DARWIN" ]; then
69 #hmmm: not quite right yet...
70 brew install blah blah? lots?
71 exit_on_error $PHASE_MESSAGE
73 # windows-based with cygwin (or we'll fail out).
74 elif [ "$OS" == "Windows_NT" ]; then
76 #hmmm: install apt-cyg!
77 # we need this to do the following step, so why not automate that?
78 # can we at least check for the packages we absolutely need?
80 #hmmm: can we bootstrap and still survive on the basic cygwin modules if already installed?
81 # then we could use our huge list to get the rest!
83 #hmmm: is there any other way to get the missing ones, that we need for apt-cyg?
85 apt-cyg install perl-File-Which perl-Text-Diff
86 exit_on_error $PHASE_MESSAGE
91 # then the builder packages...
93 PHASE_MESSAGE="installing code builder packages"
95 # ubuntu or debian or other apt-based OSes...
96 if whichable apt; then
97 sudo apt install build-essential librtmp-dev libcurl4-gnutls-dev libssl-dev
98 exit_on_error $PHASE_MESSAGE
99 # rpm based with yum available...
100 elif whichable yum; then
101 sudo yum install gcc gcc-c++ openssl-devel.x86_64 curl-devel
102 exit_on_error $PHASE_MESSAGE
104 elif [ ! -z "$IS_DARWIN" ]; then
106 #hmmm: not quite right yet...
107 brew install blork blork? lots?
108 exit_on_error $PHASE_MESSAGE
110 # windows-based with cygwin (or we'll fail out).
111 elif [ "$OS" == "Windows_NT" ]; then
113 #hmmm: unknown list needed still...
114 apt-cyg install fugazi combustinatorinibasil scampnific
115 exit_on_error $PHASE_MESSAGE
120 # install other external packages and whatnot.
122 #hmmm: anything else to get installed?
130 # get ready to finish up.
132 #...finishing steps... if any.
140 #############################
142 #############################
144 The "kona" collection depends on Java version 8 or better.
146 | Set up the java PPA archive as described here:
147 | https://launchpad.net/~webupd8team/+archive/ubuntu/java
149 #not needed at the moment.
150 #echo "bailing because script is immature. farts!"