Improved gen_all.bash slightly
This commit is contained in:
parent
ad5f788092
commit
86c10619a7
21
gen_all.bash
21
gen_all.bash
|
@ -1,21 +1,31 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Generate an installer script using the most recent version of qq2clone
|
# Generate all files that need to be generated
|
||||||
|
|
||||||
declare -a arc_files=( qq2clone lv_api_do qq2clone.1
|
declare -a arc_files=( qq2clone lv_api_do qq2clone.1
|
||||||
qq2clone-completion.bash )
|
qq2clone-completion.bash )
|
||||||
declare -a req_files=( "${arc_files[@]}" inst_fragment.bash lv_api_do.c man.pandoc )
|
declare -a req_files=( "${arc_files[@]}" inst_fragment.bash "lv_api_do.c" man.pandoc )
|
||||||
|
|
||||||
|
# Check for required files
|
||||||
|
|
||||||
has_req=1
|
has_req=1
|
||||||
for file in "${req_files[@]}"; do
|
for file in "${req_files[@]}"; do
|
||||||
if [[ ! -e "$file" ]]; then
|
if [[ ! -e "$file" ]]; then
|
||||||
|
[[ "$file" == "lv_api_do" ]] && continue
|
||||||
has_req=0
|
has_req=0
|
||||||
echo "Current working directory missing file '$file'"
|
echo "Current working directory missing file '$file'"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
((has_req)) || exit 1
|
((has_req)) || exit 1
|
||||||
|
|
||||||
echo "Generating script"
|
# Compile lv_api_do
|
||||||
|
|
||||||
|
echo "Compiling lv_api_do"
|
||||||
|
gcc lv_api_do.c -o lv_api_do -lvirt
|
||||||
|
|
||||||
|
# Generate installer
|
||||||
|
|
||||||
|
echo "Generating installer script"
|
||||||
{
|
{
|
||||||
echo "#!/bin/bash"
|
echo "#!/bin/bash"
|
||||||
echo
|
echo
|
||||||
|
@ -30,10 +40,7 @@ echo "Generating script"
|
||||||
chmod +x qq2clone_installer.bash
|
chmod +x qq2clone_installer.bash
|
||||||
|
|
||||||
# Generate manual from pandoc source in two formats
|
# Generate manual from pandoc source in two formats
|
||||||
|
|
||||||
echo "Generating manual"
|
echo "Generating manual"
|
||||||
pandoc -s -f markdown -t markdown_strict -o man.md man.pandoc
|
pandoc -s -f markdown -t markdown_strict -o man.md man.pandoc
|
||||||
pandoc -s -f markdown -t man -o qq2clone.1 man.pandoc
|
pandoc -s -f markdown -t man -o qq2clone.1 man.pandoc
|
||||||
|
|
||||||
# Compile lv_api_do
|
|
||||||
echo "Compiling lv_api_do"
|
|
||||||
gcc lv_api_do.c -o lv_api_do -lvirt
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue