You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.5 KiB
53 lines
1.5 KiB
#!/bin/bash
|
|
|
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &> /dev/null && pwd)/includes/includes"
|
|
|
|
function usage {
|
|
echo
|
|
echoMainTitle "Installs Sumedia Project Manager"
|
|
echo
|
|
echoSubTitle "Usage:"
|
|
echo
|
|
echo "install-project-manager"
|
|
echo
|
|
echo "--help Prints this message"
|
|
echo
|
|
}
|
|
|
|
help="$(getParameter "--help" false "$@")"
|
|
if [ "$help" == true ]
|
|
then
|
|
usage
|
|
exit
|
|
fi
|
|
|
|
echo
|
|
echoMainTitle "Install Sumedia Project Manager"
|
|
|
|
echo
|
|
echoSubTitle "Please configure Sumedia Project Manager"
|
|
echo
|
|
workspaces_dir="$(readConsole "Workspaces Dir" "Invalid selection" true "$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." &> /dev/null && pwd)")"
|
|
project_manager_dir="$(readConsole "Project Manager Dir" "Invalid selection" true "$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." &> /dev/null && pwd)")"
|
|
|
|
if [ ! -f "$project_manager_dir/etc/config" ]
|
|
then
|
|
cat "$project_manager_dir/etc/.project_manager_config_template" | \
|
|
sed "s/workspaces_dir=''/workspaces_dir='$(sedEscape "$workspaces_dir")'/" | \
|
|
sed "s/project_manager_dir=''/project_manager_dir='$(sedEscape "$project_manager_dir")'/" \
|
|
> "$project_manager_dir/etc/config"
|
|
fi
|
|
|
|
if [ ! -f "$project_manager_dir/etc/projects" ]
|
|
then
|
|
cp "$project_manager_dir/etc/.projects_template" "$project_manager_dir/etc/projects"
|
|
fi
|
|
|
|
echo
|
|
echoSubTitle "Running postscripts ..."
|
|
postScript "$path/bin/postscripts/commands/install-project-manager"
|
|
postScript "$workspaces_dir/$customer/$project/bin/postscripts/commands/install-project-manager"
|
|
|
|
echo
|
|
echoSuccess "Sumedia Project Manager has been installed"
|
|
echo
|