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 if whichable apt; then
59 # ubuntu or debian or other apt-based OSes...
60 sudo apt install libfile-which-perl libtext-diff-perl
61 exit_on_error $PHASE_MESSAGE
62 elif whichable yum; then
63 # rpm based with yum available...
64 sudo yum install perl-File-Which perl-Text-Diff
65 exit_on_error $PHASE_MESSAGE
66 elif [ ! -z "$IS_DARWIN" ]; then
68 brew install dos2unix openssl
69 exit_on_error $PHASE_MESSAGE
70 elif [ "$OS" == "Windows_NT" ]; then
71 # windows-based with cygwin (or we'll fail out).
73 #hmmm: install apt-cyg!
74 # we need this to do the following step, so why not automate that?
75 # can we at least check for the packages we absolutely need?
77 #hmmm: can we bootstrap and still survive on the basic cygwin modules if already installed?
78 # then we could use our huge list to get the rest!
80 #hmmm: is there any other way to get the missing ones, that we need for apt-cyg?
82 apt-cyg install perl-File-Which perl-Text-Diff
83 exit_on_error $PHASE_MESSAGE
88 # then the builder packages...
90 PHASE_MESSAGE="installing code builder packages"
92 if whichable apt; then
93 # ubuntu or debian or other apt-based OSes...
94 sudo apt install build-essential librtmp-dev libcurl4-gnutls-dev libssl-dev
95 exit_on_error $PHASE_MESSAGE
96 elif whichable yum; then
97 # rpm based with yum available...
98 sudo yum install gcc gcc-c++ openssl-devel.x86_64 curl-devel
99 exit_on_error $PHASE_MESSAGE
100 elif [ ! -z "$IS_DARWIN" ]; then
102 #hmmm: still working on these...
103 brew install gpg meld openjdk
104 exit_on_error $PHASE_MESSAGE
105 elif [ "$OS" == "Windows_NT" ]; then
106 # windows-based with cygwin (or we'll fail out).
108 #hmmm: unknown list needed still...
109 apt-cyg install fugazi combustinatorinibasil scampnific
110 exit_on_error $PHASE_MESSAGE
115 # install other external packages and whatnot.
117 #hmmm: anything else to get installed?
125 # get ready to finish up.
127 #...finishing steps... if any.
135 #############################
137 #############################
139 The "kona" collection depends on Java version 8 or better.
141 | Set up the java PPA archive as described here:
142 | https://launchpad.net/~webupd8team/+archive/ubuntu/java
144 #not needed at the moment.
145 #echo "bailing because script is immature. farts!"