mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Prevented errors when listing no jar groups.
This commit is contained in:
parent
6ba90f44ed
commit
4f51ee8446
26
init/msm
26
init/msm
@ -520,19 +520,21 @@ server_set_active() {
|
||||
|
||||
# Lists the jar files grouped by jar groups.
|
||||
jargroup_list() {
|
||||
local jargroup_name
|
||||
local jar_name
|
||||
if [[ -d "${JAR_STORAGE_PATH}" ]]; then
|
||||
local jargroup_name
|
||||
local jar_name
|
||||
|
||||
while IFS= read -r -d $'\0' jargroup_path; do
|
||||
jargroup_name="$(basename "${jargroup_path}")"
|
||||
echo "$jargroup_name"
|
||||
while IFS= read -r -d $'\0' jar_path; do
|
||||
jar_name="$(basename "${jar_path}")"
|
||||
if [[ "$jar_name" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}- ]]; then
|
||||
echo " $jar_name"
|
||||
fi
|
||||
done < <(find "${JAR_STORAGE_PATH}/${jargroup_name}" -mindepth 1 -maxdepth 1 -type f -print0)
|
||||
done < <(find "${JAR_STORAGE_PATH}" -mindepth 1 -maxdepth 1 -type d -print0)
|
||||
while IFS= read -r -d $'\0' jargroup_path; do
|
||||
jargroup_name="$(basename "${jargroup_path}")"
|
||||
echo "$jargroup_name"
|
||||
while IFS= read -r -d $'\0' jar_path; do
|
||||
jar_name="$(basename "${jar_path}")"
|
||||
if [[ "$jar_name" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}- ]]; then
|
||||
echo " $jar_name"
|
||||
fi
|
||||
done < <(find "${JAR_STORAGE_PATH}/${jargroup_name}" -mindepth 1 -maxdepth 1 -type f -print0)
|
||||
done < <(find "${JAR_STORAGE_PATH}" -mindepth 1 -maxdepth 1 -type d -print0)
|
||||
fi
|
||||
}
|
||||
|
||||
# Creates a new jargroup
|
||||
|
Loading…
Reference in New Issue
Block a user