Browse Source

fix project manager dir config on project manager

master
Sven Ullmann 2 years ago
parent
commit
4c36d1ebbe
  1. 8
      README.md
  2. 14
      bin/project-manager

8
README.md

@ -24,3 +24,11 @@ Now you can execute it the first time and check the configuration of your Projec
project-manager
## Setup
In order to use the project manager you have to execute it once
project-manager

14
bin/project-manager

@ -1,16 +1,16 @@
#!/bin/bash
set -e
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" ]
dir="$(readlink -f "$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/..")"
source "$dir/bin/includes/includes"
if [ -f "$dir/etc/config" ]
then
source "$project_manager_dir/etc/config"
source "$dir/etc/config"
fi
if [ -f "$project_manager_dir/etc/projects" ]
if [ -f "$dir/etc/projects" ]
then
source "$project_manager_dir/etc/projects"
source "$dir/etc/projects"
fi
function use {
@ -48,7 +48,7 @@ function list {
echo >&2
}
if [ "$1" == "" ]
if [ "$1" == "" ] && [ -f "$project_manager_dir/etc/config" ] && [ -f "$project_manager_dir/etc/projects" ]
then
use
exit

Loading…
Cancel
Save