3 # this is the feisty meow host preparation script. it installs all the packages required to run and build feisty meow scripts and applications.
5 # hmmm: this script may still be a bit incomplete; we definitely use a lot of unix and linux tools in different scripts.
7 # preconditions and dependencies--this script itself depends on:
14 ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && /bin/pwd )"
15 CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )"
16 THIS_TOOL_NAME="$(basename "$0")"
18 # set up the feisty_meow dir.
19 pushd "$CORE_SCRIPTS_DIR/../.." &>/dev/null
20 #source "$CORE_SCRIPTS_DIR/functions.sh"
21 echo originating folder is $ORIGINATING_FOLDER
22 export FEISTY_MEOW_APEX="$(/bin/pwd)"
23 echo feisty now apex is FEISTY_MEOW_APEX=$FEISTY_MEOW_APEX
29 function exit_on_error() {
31 echo -e "\n\nan important action failed and this script will stop:\n\n$*\n\n*** Exiting script..."
41 local WHICHER="$(/usr/bin/which which 2>/dev/null)";
47 sporkenz=$($WHICHER "$to_find" 2>/dev/null);
55 function apt_cyg_finder()
57 if whichable apt-cyg; then
59 #hmmm: is that the right syntax for bash?
62 The apt-cyg tool does not seem to be available for cygwin.
63 Please follow the install instructions at:
64 https://github.com/transcode-open/apt-cyg
66 return 13 # not found.
72 # load feisty meow environment here, but first test that we *can* load it.
74 #hmmm: currently, this script needs the system to have already been configured?
75 # that's the implication of calling launch_feisty...
76 # can we find that same bootstrapping code that will reconfigure first?
78 # hmmm: we need clean starty type approach! must not expect feisty to already be configured for use!
79 # e.g.?? $ bash /opt/feistymeow.org/feisty_meow/scripts/core/reconfigure_feisty_meow.sh
80 # hmmm: above ALSO ESSENTIAL TO GET RIGHT!
82 BASE_PHASE_MESSAGE="Feisty Meow subsystems integrity check: "
84 # is our main variable set?
85 PHASE_MESSAGE="$BASE_PHASE_MESSAGE presence of FEISTY_MEOW_APEX variable"
86 if [ -z "$FEISTY_MEOW_APEX" ]; then
87 false; exit_on_error $PHASE_MESSAGE
90 # simple brute force check. can we go there?
91 PHASE_MESSAGE="$BASE_PHASE_MESSAGE check on directory $FEISTY_MEOW_APEX"
92 pushd $FEISTY_MEOW_APEX &> /dev/null
93 exit_on_error $PHASE_MESSAGE
96 # now ask feisty if it's there; should work as long as our scripts are in place.
97 #PHASE_MESSAGE="$BASE_PHASE_MESSAGE inquiry is_feisty_up"
98 #bash $FEISTY_MEOW_APEX/scripts/core/is_feisty_up.sh
99 #exit_on_error $PHASE_MESSAGE
102 #hmmm: this will currently fail if reconfigure has never been called.
103 #NO NO NO. source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
104 # we are preparing to get feisty running; how can we use feisty during
105 # that process? so bad.
109 #hmmm: why two phases?
111 # first the crucial bits for scripts to work...
113 PHASE_MESSAGE="installing perl file and diff modules"
115 if whichable apt; then
116 # ubuntu or debian or other apt-based OSes...
117 sudo apt install libfile-which-perl libtext-diff-perl
118 exit_on_error $PHASE_MESSAGE
119 elif whichable yum; then
120 # rpm based with yum available...
121 sudo yum install perl-Env perl-File-Which perl-Text-Diff
122 exit_on_error $PHASE_MESSAGE
123 elif [ ! -z "$IS_DARWIN" ]; then
125 brew install dos2unix openssl
126 exit_on_error $PHASE_MESSAGE
127 elif [ "$OS" == "Windows_NT" ]; then
128 # windows-based with cygwin (or we'll fail out currently).
129 if apt_cyg_finder; then
130 apt-cyg install perl-File-Which perl-Text-Diff
131 exit_on_error $PHASE_MESSAGE
137 # then the builder packages...
139 PHASE_MESSAGE="installing code builder packages"
141 if whichable apt; then
142 # ubuntu or debian or other apt-based OSes...
143 sudo apt install mawk build-essential librtmp-dev libcurl4-gnutls-dev libssl-dev
144 exit_on_error $PHASE_MESSAGE
145 elif whichable yum; then
146 # rpm based with yum available...
147 sudo yum install curl-devel gcc gcc-c++ make mawk openssl-devel.x86_64 zlib-devel
148 exit_on_error $PHASE_MESSAGE
149 elif [ ! -z "$IS_DARWIN" ]; then
151 #hmmm: still working on these...
152 brew install mawk gpg meld openjdk
153 exit_on_error $PHASE_MESSAGE
154 elif [ "$OS" == "Windows_NT" ]; then
155 # windows-based with cygwin (or we'll fail out).
157 if apt_cyg_finder; then
158 echo need to fix apt cyg install list somewhat.
159 #hmmm: list is in our docs as a separate file for cygwin.
160 # plug those packages into here please.
161 apt-cyg install gawk libcurl-devel meld mingw64-i686-openssl openssl openssl-devel libssl-devel zlib-devel
162 exit_on_error $PHASE_MESSAGE
164 #extended set. just add them?
165 # xorg-server xorg-docs xlaunch
172 # install other external packages and whatnot.
174 #hmmm: anything else to get installed?
182 # get ready to finish up.
184 #...finishing steps... if any.
192 #############################
194 #############################
196 The "kona" collection depends on Java version 8 or better.
198 | Set up the java PPA archive as described here:
199 | https://launchpad.net/~webupd8team/+archive/ubuntu/java
201 #not needed at the moment.
202 #echo "bailing because script is immature. farts!"