Browse Source

fix project manager dir config on project manager

master
Sven Ullmann 2 years ago
parent
commit
216966f445
  1. 24
      bin/project-manager

24
bin/project-manager

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

Loading…
Cancel
Save