From a2552ab1b8af476ba66b807c97826be030018dd7 Mon Sep 17 00:00:00 2001 From: Kayou Date: Sun, 7 Jul 2019 11:02:51 +0200 Subject: [PATCH 1/3] Fix sed level 8 --- package_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package_check.sh b/package_check.sh index 78ebb6d..7a7613c 100755 --- a/package_check.sh +++ b/package_check.sh @@ -715,7 +715,7 @@ TEST_RESULTS () { # Get the name of the app from the repository name. app_name="$(basename --multiple --suffix=_ynh "$app_arg")" # Extract the app part from the json file. From the name line to the url line. - json_app_part=$(sed -n "/$app_name/,/${app_arg//\//.}/p" "$script_dir/list.json") + json_app_part=$(sed -n "/${app_name}/,/${app_arg//\//.}/{p; /${app_arg//\//.}/q}" "$script_dir/list.json") if [ -z "$json_app_part" ] then echo "$app_name for the repository $app_arg can't be found in the app list." From 3e09399f26bbdc6f824293cff1d88ed3abbe736c Mon Sep 17 00:00:00 2001 From: Kayou Date: Sun, 7 Jul 2019 14:08:04 +0200 Subject: [PATCH 2/3] Apply suggestions from code review Co-Authored-By: Maniack Crudelis --- package_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package_check.sh b/package_check.sh index 7a7613c..eb05102 100755 --- a/package_check.sh +++ b/package_check.sh @@ -715,7 +715,7 @@ TEST_RESULTS () { # Get the name of the app from the repository name. app_name="$(basename --multiple --suffix=_ynh "$app_arg")" # Extract the app part from the json file. From the name line to the url line. - json_app_part=$(sed -n "/${app_name}/,/${app_arg//\//.}/{p; /${app_arg//\//.}/q}" "$script_dir/list.json") + json_app_part=$(sed -n "/\"$app_name\"/,/}/p" "$script_dir/list.json") if [ -z "$json_app_part" ] then echo "$app_name for the repository $app_arg can't be found in the app list." From 6ed75b423bd8c3c4f90daf9376ec94e15285192e Mon Sep 17 00:00:00 2001 From: Kayou Date: Sun, 7 Jul 2019 14:09:24 +0200 Subject: [PATCH 3/3] update comment --- package_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package_check.sh b/package_check.sh index eb05102..5087174 100755 --- a/package_check.sh +++ b/package_check.sh @@ -714,7 +714,7 @@ TEST_RESULTS () { # Get the name of the app from the repository name. app_name="$(basename --multiple --suffix=_ynh "$app_arg")" - # Extract the app part from the json file. From the name line to the url line. + # Extract the app part from the json file. From the name line to the next "}" line. json_app_part=$(sed -n "/\"$app_name\"/,/}/p" "$script_dir/list.json") if [ -z "$json_app_part" ] then