diff --git a/Speed.sh b/speed.sh similarity index 94% rename from Speed.sh rename to speed.sh index c0e5fae..0a3799f 100644 --- a/Speed.sh +++ b/speed.sh @@ -187,11 +187,14 @@ input(){ done yellow "\n $(eval echo "\${${T}[7]}") " reading "\n $(eval echo "\${${T}[8]}") " INCLUDE_REMARK + [ -n "$INCLUDE_REMARK" ] && INCLUDE_REMARK="--include-remark $INCLUDE_REMARK" reading "\n $(eval echo "\${${T}[9]}") " EXCLUDE_REMARK + [ -n "$EXCLUDE_REMARK" ] && EXCLUDE_REMARK="--exclude-remark $EXCLUDE_REMARK" reading "\n $(eval echo "\${${T}[10]}") " GROUP - RESULT_COLOR="origin" && yellow "\n $(eval echo "\${${T}[11]}") " && reading " $(eval echo "\${${T}[3]}") " CHOOSE_COLOR && [ "$CHOOSE_COLOR" = 2 ] && RESULT_COLOR="poor" + [ -n "$GROUP" ] && GROUP="-g $GROUP" + RESULT_COLOR="--color=origin" && yellow "\n $(eval echo "\${${T}[11]}") " && reading " $(eval echo "\${${T}[3]}") " CHOOSE_COLOR && [ "$CHOOSE_COLOR" = 2 ] && RESULT_COLOR="--color=poor" yellow "\n $(eval echo "\${${T}[12]}") " && reading " $(eval echo "\${${T}[3]}") " CHOOSE_METHOD - case "$CHOOSE_METHOD" in 1 ) SORT_METHOD=speed;; 2 ) SORT_METHOD=rspeed;; 3 ) SORT_METHOD=ping;; 4 ) SORT_METHOD=rping;; esac + case "$CHOOSE_METHOD" in 1 ) SORT_METHOD="--sort=speed";; 2 ) SORT_METHOD="--sort=rspeed";; 3 ) SORT_METHOD="--sort=ping";; 4 ) SORT_METHOD="--sort=rping";; esac } check_operating_system(){ @@ -227,7 +230,7 @@ check_ssrspeedn(){ test(){ green "\n $(eval echo "\${${T}[16]}") \n" - sudo python3 -m ssrspeed -u "$URL" --include-remark "$INCLUDE_REMARK" --exclude-remark "$EXCLUDE_REMARK" -g "$GROUP" --yes --color="$RESULT_COLOR" --sort="$SORT_METHOD" --skip-requirements-check + sudo python3 -m ssrspeed -u "$URL" "$INCLUDE_REMARK" "$EXCLUDE_REMARK" "$GROUP" "$RESULT_COLOR" "$SORT_METHOD" --yes --skip-requirements-check } uninstall(){ @@ -270,4 +273,4 @@ input check_operating_system check_brew check_ssrspeedn -test \ No newline at end of file +test