Added wildcard to :digit CLASS for channelup/channeldown scripts so that you can have more than 9 channels work with these scripts.

This commit is contained in:
Justin Emter
2017-09-08 20:06:56 -07:00
parent 01a9c205a9
commit 28bba9d89f
2 changed files with 2 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ CHANNEL_DIR_INCREMENT_SYMBOL="_"
FIRST_RUN=false
# Scan the dir to see how many channels there are, store them in an arr.
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]' -printf "%P\n") )
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]*' -printf "%P\n") )
# If the previous channel txt file doesn't exist already create it (first run?)
if [ ! -e "$OUTPUT_PREV_CHANNEL_PATH/$OUTPUT_PREV_CHANNEL_FILE" ]; then

View File

@@ -49,7 +49,7 @@ fi
# If the file exists b
# Scan the dir to see how many channels there are, store them in an arr.
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]' -printf "%P\n") )
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]*' -printf "%P\n") )
# If this script see's there are multiple channels,
# then read file, get prevchannel, increment, and trigger next channel: