1
Fork 0
This repository has been archived on 2024-04-09. You can view files and clone it, but cannot push or open issues/pull-requests.
podcastoscope/bin/bld/bld_cmd.sh

27 lines
676 B
Bash
Raw Permalink Normal View History

#!/bin/bash
###### Parse Arguments ########################################################
command=$1
args=()
for ((i=2; i<=$#; i+=1)); do
args+=(${!i})
done
###### Source the Core ########################################################
bld_path="$(dirname $(realpath "$0"))"
source "$bld_path/bld_core.sh"
###### Dispatch ###############################################################
if [ "$command" == "cmp" ]; then
bld_compile "${args[@]}"
elif [ "$command" == "lnk" ]; then
bld_link "${args[@]}"
elif [ "$command" == "lib" ]; then
bld_lib "${args[@]}"
elif [ "$command" == "unit" ]; then
bld_unit "${args[@]}"
else
echo "unknown command '$command'"
fi