#
# This only accepts one argument, followed by these optional arguments:
# 1) One of "Modes" from below.
-# 2) Optional, may be one of: +d, +l, +n, +V, +Q, +E, +N, +D, --enable-shared, --enable-static, --disable-shared, --disable-static.
+# 2) Optional, may be one of: +d, +l, +n, +V, +Q, +E, +N, +D, -X, --enable-shared, --enable-static, --disable-shared, --disable-static.
# 3) Optional, may be one of: -w, --work.
# 4) Optional, may be: clang.
#
# The -w/--work requires the path to the work directory following it.
# The clang parameter does not need the "-m".
#
+# The -X represents excluding a program when building.
+#
# This will create a directory at he present working directory of the script caller called "fll" where everything will be installed.
# This assumes the shell script is GNU bash.
# This is not intended to provide any extensive or thorough error handling.
build_mode_extra_value_2=
shell_command=bash
suppress_first="+F"
+exclude_programs=
+grab_next=
+skip=
if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
shell_command=zsh
fi
let i=2
+let j=
p=
while [[ ${i} -le $# ]] ; do
p=${!i}
fi
- if [[ ${p} == "+d" ]] ; then
+ if [[ ${grab_next} == "exclude_program" ]] ; then
+ exclude_programs="${exclude_programs}${p} "
+ grab_next=
+ elif [[ ${p} == "+d" ]] ; then
color="+d"
elif [[ ${p} == "+l" ]] ; then
color="+l"
elif [[ ${p} == "+D" ]] ; then
verbose="+D"
verbose_common="-v"
+ elif [[ ${p} == "-X" ]] ; then
+ grab_next="exclude_program"
elif [[ ${p} == "--enable-static" ]] ; then
static="--enable-static"
elif [[ ${p} == "--disable-static" ]] ; then
for i in * ; do
+ skip=
+
+ for j in ${exclude_programs} ; do
+ if [[ ${i} == "${j}-${version}" ]] ; then
+ skip="true"
+
+ break
+ fi
+ done
+
+ if [[ $skip != "" ]] ; then
+ echo "Skipping program: '${i}'."
+ echo
+
+ continue
+ fi
+
cd ${path_original}package/program/${i} &&
${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&