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:
11 #weird approach here man.
12 # why are we assuming any part of feisty meow is set up yet?
13 # the dependencies that the codebase has are why we're installing things below.
15 # + intuit the feisty meow location based on relative dir placement.
16 # + reduce checks to barest presence ones.
17 # + drop any requirements on feisty functions that might require the
18 # very code we're installing.
25 function exit_on_error() {
27 echo -e "\n\nan important action failed and this script will stop:\n\n$*\n\n*** Exiting script..."
37 local WHICHER="$(/usr/bin/which which 2>/dev/null)";
43 sporkenz=$($WHICHER "$to_find" 2>/dev/null);
51 function apt_cyg_finder()
53 if whichable apt-cyg; then
55 #hmmm: is that the right syntax for bash?
58 The apt-cyg tool does not seem to be available for cygwin.
59 Please follow the install instructions at:
60 https://github.com/transcode-open/apt-cyg
62 return 13 # not found.
68 # load feisty meow environment here, but first test that we *can* load it.
70 #hmmm: currently, this script needs the system to have already been configured?
71 # that's the implication of calling launch_feisty...
72 # can we find that same bootstrapping code that will reconfigure first?
74 # hmmm: we need clean starty type approach! must not expect feisty to already be configured for use!
75 # e.g.?? $ bash /opt/feistymeow.org/feisty_meow/scripts/core/reconfigure_feisty_meow.sh
76 # hmmm: above ALSO ESSENTIAL TO GET RIGHT!
78 BASE_PHASE_MESSAGE="Feisty Meow subsystems integrity check: "
80 # is our main variable set?
81 PHASE_MESSAGE="$BASE_PHASE_MESSAGE presence of FEISTY_MEOW_APEX variable"
82 if [ -z "$FEISTY_MEOW_APEX" ]; then
83 false; exit_on_error $PHASE_MESSAGE
86 # simple brute force check. can we go there?
87 PHASE_MESSAGE="$BASE_PHASE_MESSAGE check on directory $FEISTY_MEOW_APEX"
88 pushd $FEISTY_MEOW_APEX &> /dev/null
89 exit_on_error $PHASE_MESSAGE
92 # now ask feisty if it's there; should work as long as our scripts are in place.
93 #PHASE_MESSAGE="$BASE_PHASE_MESSAGE inquiry is_feisty_up"
94 #bash $FEISTY_MEOW_APEX/scripts/core/is_feisty_up.sh
95 #exit_on_error $PHASE_MESSAGE
98 #hmmm: this will currently fail if reconfigure has never been called.
99 #NO NO NO. source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
100 # we are preparing to get feisty running; how can we use feisty during
101 # that process? so bad.
105 #hmmm: why two phases?
107 # first the crucial bits for scripts to work...
109 PHASE_MESSAGE="installing perl file and diff modules"
111 if whichable apt; then
112 # ubuntu or debian or other apt-based OSes...
113 sudo apt install libfile-which-perl libtext-diff-perl
114 exit_on_error $PHASE_MESSAGE
115 elif whichable yum; then
116 # rpm based with yum available...
117 sudo yum install perl-Env perl-File-Which perl-Text-Diff
118 exit_on_error $PHASE_MESSAGE
119 elif [ ! -z "$IS_DARWIN" ]; then
121 brew install dos2unix openssl
122 exit_on_error $PHASE_MESSAGE
123 elif [ "$OS" == "Windows_NT" ]; then
124 # windows-based with cygwin (or we'll fail out currently).
125 if apt_cyg_finder; then
126 apt-cyg install perl-File-Which perl-Text-Diff
127 exit_on_error $PHASE_MESSAGE
133 # then the builder packages...
135 PHASE_MESSAGE="installing code builder packages"
137 if whichable apt; then
138 # ubuntu or debian or other apt-based OSes...
139 sudo apt install mawk build-essential librtmp-dev libcurl4-gnutls-dev libssl-dev
140 exit_on_error $PHASE_MESSAGE
141 elif whichable yum; then
142 # rpm based with yum available...
143 sudo yum install curl-devel gcc gcc-c++ make mawk openssl-devel.x86_64 zlib-devel
144 exit_on_error $PHASE_MESSAGE
145 elif [ ! -z "$IS_DARWIN" ]; then
147 #hmmm: still working on these...
148 brew install mawk gpg meld openjdk
149 exit_on_error $PHASE_MESSAGE
150 elif [ "$OS" == "Windows_NT" ]; then
151 # windows-based with cygwin (or we'll fail out).
153 if apt_cyg_finder; then
154 echo need to fix apt cyg install list somewhat.
155 #hmmm: list is in our docs as a separate file for cygwin.
156 # plug those packages into here please.
157 apt-cyg install gawk libcurl-devel meld mingw64-i686-openssl openssl openssl-devel libssl-devel zlib-devel
158 exit_on_error $PHASE_MESSAGE
160 #extended set. just add them?
161 # xorg-server xorg-docs xlaunch
168 # install other external packages and whatnot.
170 #hmmm: anything else to get installed?
178 # get ready to finish up.
180 #...finishing steps... if any.
188 #############################
190 #############################
192 The "kona" collection depends on Java version 8 or better.
194 | Set up the java PPA archive as described here:
195 | https://launchpad.net/~webupd8team/+archive/ubuntu/java
197 #not needed at the moment.
198 #echo "bailing because script is immature. farts!"