Update usb-passthrough.sh

clean
pull/1141/head
tteckster 2 years ago committed by GitHub
parent 7305fa4f0a
commit 6b10aa922a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,31 +15,6 @@ while true; do
esac
done
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
shopt -s expand_aliases
alias die='EXIT=$? LINE=$LINENO error_exit'
trap die ERR
trap cleanup EXIT
function error_exit() {
trap - ERR
local DEFAULT='Unknown failure occured.'
local REASON="\e[97m${1:-$DEFAULT}\e[39m"
local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE"
msg "$FLAG $REASON"
exit $EXIT
}
function msg() {
local TEXT="$1"
echo -e "$TEXT"
}
function cleanup() {
popd >/dev/null
rm -rf $TEMP_DIR
}
TEMP_DIR=$(mktemp -d)
pushd $TEMP_DIR >/dev/null
CHAR_DEVS+=("166:.*")

Loading…
Cancel
Save

Powered by BW's shoe-string budget.