mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2025-12-27 13:43:31 +00:00
Added new bash script logic to better sequentially sort channels by channel number.
This commit is contained in:
@@ -37,7 +37,7 @@ if [ -d "$VIRTUAL_ENV_DIR" ]; then
|
||||
fi
|
||||
|
||||
# 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" | sort -t_ -n) )
|
||||
|
||||
# If this script see's there are multiple channels,
|
||||
# then loop through each channel and run the daily schedule generator
|
||||
|
||||
@@ -42,7 +42,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" | sort -t_ -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
|
||||
|
||||
@@ -37,7 +37,7 @@ if [ -e "$OUTPUT_PREV_CHANNEL_PATH/$OUTPUT_PREV_CHANNEL_FILE" ]; then
|
||||
fi
|
||||
|
||||
# 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" | sort -t_ -n) )
|
||||
|
||||
# If this script see's there are multiple channels,
|
||||
# check each channel dir for running .pid file to kill the process/delete the file:
|
||||
|
||||
@@ -24,7 +24,7 @@ CHANNEL_DIR_INCREMENT_SYMBOL="_"
|
||||
#----END EDITABLE VARS-------
|
||||
|
||||
# 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" | sort -t_ -n) )
|
||||
|
||||
# If this script see's there are multiple channels,
|
||||
# then loop through each channel and run clone the repo there
|
||||
|
||||
@@ -46,7 +46,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" | sort -t_ -n) )
|
||||
|
||||
# If this script see's there are multiple channels,
|
||||
# then loop through each channel and run the updates
|
||||
|
||||
Reference in New Issue
Block a user