Update install.sh (#3270)

Optimization Code
1. Use #!/usr/bin/env bash instead of #!/bin/bash to make the script more portable.
2. Use rm -rf instead of rm -r to remove directories recursively.

Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com>
Co-authored-by: Olatunji Ruwase <olruwase@microsoft.com>
This commit is contained in:
digger-yu
2023-04-18 11:41:08 +08:00
committed by GitHub
parent 48297c4841
commit 077e42e68a

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
err_report() {
@ -121,7 +121,7 @@ rm_if_exist() {
if [ -f $1 ]; then
rm $VERBOSE $1
elif [ -d $1 ]; then
rm -r $VERBOSE $1
rm -rf $VERBOSE $1
fi
}