|
@ -1,16 +1,16 @@ |
|
|
#!/bin/bash |
|
|
#!/bin/bash |
|
|
set -e |
|
|
set -e |
|
|
|
|
|
|
|
|
dir="$(readlink -f "$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/..")" |
|
|
|
|
|
source "$dir/bin/includes/includes" |
|
|
|
|
|
if [ -f "$dir/etc/config" ] |
|
|
|
|
|
|
|
|
project_manager_dir="$(readlink -f "$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/..")" |
|
|
|
|
|
source "$project_manager_dir/bin/includes/includes" |
|
|
|
|
|
if [ -f "$project_manager_dir/etc/config" ] |
|
|
then |
|
|
then |
|
|
source "$dir/etc/config" |
|
|
|
|
|
|
|
|
source "$project_manager_dir/etc/config" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
if [ -f "$dir/etc/projects" ] |
|
|
|
|
|
|
|
|
if [ -f "$project_manager_dir/etc/projects" ] |
|
|
then |
|
|
then |
|
|
source "$dir/etc/projects" |
|
|
|
|
|
|
|
|
source "$project_manager_dir/etc/projects" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
function use { |
|
|
function use { |
|
@ -48,12 +48,6 @@ function list { |
|
|
echo >&2 |
|
|
echo >&2 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if [ "$1" == "" ] && [ -f "$project_manager_dir/etc/config" ] && [ -f "$project_manager_dir/etc/projects" ] |
|
|
|
|
|
then |
|
|
|
|
|
use |
|
|
|
|
|
exit |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
help="$(getParameter "--help" false "$*")" |
|
|
help="$(getParameter "--help" false "$*")" |
|
|
list_commands="$(getParameter "--list-commands" false "$*")" |
|
|
list_commands="$(getParameter "--list-commands" false "$*")" |
|
|
list_plugins="$(getParameter "--list-plugins" false "$*")" |
|
|
list_plugins="$(getParameter "--list-plugins" false "$*")" |
|
@ -75,6 +69,12 @@ then |
|
|
plugin="" |
|
|
plugin="" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if [ "$1" == "" ] && [ "command" == "" ] |
|
|
|
|
|
then |
|
|
|
|
|
use |
|
|
|
|
|
exit |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
if [ "$help" == true ] || [ "$list_commands" == true ] || [ "$list_plugins" == "true" ] |
|
|
if [ "$help" == true ] || [ "$list_commands" == true ] || [ "$list_plugins" == "true" ] |
|
|
then |
|
|
then |
|
|
|
|
|
|
|
|