diff --git a/.images/adding-subdomain-project.png b/.images/adding-subdomain-project.png new file mode 100644 index 0000000..fdbaacd Binary files /dev/null and b/.images/adding-subdomain-project.png differ diff --git a/README.md b/README.md index c5c9746..274c99e 100644 --- a/README.md +++ b/README.md @@ -50,4 +50,6 @@ In order to use the project manager you have to execute it once ![](.images/adding-subdomain-project.png) +![](.images/directories-with-subdomain.png) + diff --git a/bin/commands/remove-project b/bin/commands/remove-project index 2cf0760..cb3e4fe 100644 --- a/bin/commands/remove-project +++ b/bin/commands/remove-project @@ -104,8 +104,8 @@ EOF echo echo "Moving files to trash" -customer_dir_list="$(ls -t "$project_manager_dir/data/$customer")" -has_more_dirs=$(if [ "${#customer_dir_list[*]}" -gt 1 ]; then echo true; else echo false; fi) +customer_dir_list=($(ls -t "$project_manager_dir/data/$customer")) +has_more_dirs=$(if [ "${#customer_dir_list[@]}" -gt 1 ]; then echo true; else echo false; fi) rand=$(cat /proc/sys/kernel/random/uuid) trash_path="$project_manager_dir/.trash/$rand" @@ -117,7 +117,7 @@ mkdir "$trash_path/workspace/$customer" mv "$project_manager_dir/data/$customer/$project" "$trash_path/data/$customer/$project" mv "$workspaces_dir/$customer/$project" "$trash_path/workspace/$customer/$project" -if [ "$has_more_dirs" == false ] +if [ "$has_more_dirs" != true ] then rmdir "$project_manager_dir/data/$customer" rmdir "$workspaces_dir/$customer"