Update and rename Speed.sh to speed.sh

dependabot/github_actions/actions/checkout-3.1.0
fscarmen 4 years ago committed by GitHub
parent 28028c1e45
commit a20522f4e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      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
test
Loading…
Cancel
Save