From 6b10aa922afa27301eae8aaf7c45e20dc99bca02 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Mar 2023 19:08:45 -0500 Subject: [PATCH] Update usb-passthrough.sh clean --- misc/usb-passthrough.sh | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/misc/usb-passthrough.sh b/misc/usb-passthrough.sh index 8274d96b..851b3e06 100644 --- a/misc/usb-passthrough.sh +++ b/misc/usb-passthrough.sh @@ -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:.*")