mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2025-12-23 11:43:44 +00:00
Added increment symbol option to new sort logic, also made all scripts executable from the get go.
This commit is contained in:
2
multi-channel-bash-scripts/channeldown.sh
Normal file → Executable file
2
multi-channel-bash-scripts/channeldown.sh
Normal file → Executable file
@@ -38,7 +38,7 @@ CHANNEL_DIR_INCREMENT_SYMBOL="_"
|
|||||||
FIRST_RUN=false
|
FIRST_RUN=false
|
||||||
|
|
||||||
# Scan the dir to see how many channels there are, store them in an arr.
|
# 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" | sort -t_ -n) )
|
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]*' -printf "%P\n" | sort -t"$CHANNEL_DIR_INCREMENT_SYMBOL" -n) )
|
||||||
|
|
||||||
# If the previous channel txt file doesn't exist already create it (first run?)
|
# 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
|
if [ ! -e "$OUTPUT_PREV_CHANNEL_PATH/$OUTPUT_PREV_CHANNEL_FILE" ]; then
|
||||||
|
|||||||
2
multi-channel-bash-scripts/channelup.sh
Normal file → Executable file
2
multi-channel-bash-scripts/channelup.sh
Normal file → Executable file
@@ -49,7 +49,7 @@ fi
|
|||||||
# If the file exists b
|
# If the file exists b
|
||||||
|
|
||||||
# Scan the dir to see how many channels there are, store them in an arr.
|
# 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" | sort -t_ -n) )
|
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]*' -printf "%P\n" | sort -t"$CHANNEL_DIR_INCREMENT_SYMBOL" -n) )
|
||||||
|
|
||||||
# If this script see's there are multiple channels,
|
# If this script see's there are multiple channels,
|
||||||
# then read file, get prevchannel, increment, and trigger next channel:
|
# then read file, get prevchannel, increment, and trigger next channel:
|
||||||
|
|||||||
2
multi-channel-bash-scripts/generate-channels-daily-schedules.sh
Normal file → Executable file
2
multi-channel-bash-scripts/generate-channels-daily-schedules.sh
Normal file → Executable file
@@ -37,7 +37,7 @@ if [ -d "$VIRTUAL_ENV_DIR" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Scan the dir to see how many channels there are, store them in an arr.
|
# 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" | sort -t_ -n) )
|
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]*' -printf "%P\n" | sort -t"$CHANNEL_DIR_INCREMENT_SYMBOL" -n) )
|
||||||
|
|
||||||
# If this script see's there are multiple channels,
|
# If this script see's there are multiple channels,
|
||||||
# then loop through each channel and run the daily schedule generator
|
# then loop through each channel and run the daily schedule generator
|
||||||
|
|||||||
2
multi-channel-bash-scripts/manual.sh
Normal file → Executable file
2
multi-channel-bash-scripts/manual.sh
Normal file → Executable file
@@ -42,7 +42,7 @@ CHANNEL_DIR_INCREMENT_SYMBOL="_"
|
|||||||
FIRST_RUN=false
|
FIRST_RUN=false
|
||||||
|
|
||||||
# Scan the dir to see how many channels there are, store them in an arr.
|
# 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" | sort -t_ -n) )
|
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]*' -printf "%P\n" | sort -t"$CHANNEL_DIR_INCREMENT_SYMBOL" -n) )
|
||||||
|
|
||||||
# If the previous channel txt file doesn't exist already create it (first run?)
|
# 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
|
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
|
fi
|
||||||
|
|
||||||
# Scan the dir to see how many channels there are, store them in an arr.
|
# 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" | sort -t_ -n) )
|
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]*' -printf "%P\n" | sort -t"$CHANNEL_DIR_INCREMENT_SYMBOL" -n) )
|
||||||
|
|
||||||
# If this script see's there are multiple channels,
|
# If this script see's there are multiple channels,
|
||||||
# check each channel dir for running .pid file to kill the process/delete the file:
|
# check each channel dir for running .pid file to kill the process/delete the file:
|
||||||
|
|||||||
2
multi-channel-bash-scripts/update-channels-from-git.sh
Normal file → Executable file
2
multi-channel-bash-scripts/update-channels-from-git.sh
Normal file → Executable file
@@ -24,7 +24,7 @@ CHANNEL_DIR_INCREMENT_SYMBOL="_"
|
|||||||
#----END EDITABLE VARS-------
|
#----END EDITABLE VARS-------
|
||||||
|
|
||||||
# Scan the dir to see how many channels there are, store them in an arr.
|
# 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" | sort -t_ -n) )
|
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]*' -printf "%P\n" | sort -t"$CHANNEL_DIR_INCREMENT_SYMBOL" -n) )
|
||||||
|
|
||||||
# If this script see's there are multiple channels,
|
# If this script see's there are multiple channels,
|
||||||
# then loop through each channel and run clone the repo there
|
# then loop through each channel and run clone the repo there
|
||||||
|
|||||||
2
multi-channel-bash-scripts/updatechannels.sh
Normal file → Executable file
2
multi-channel-bash-scripts/updatechannels.sh
Normal file → Executable file
@@ -46,7 +46,7 @@ fi
|
|||||||
# If the file exists b
|
# If the file exists b
|
||||||
|
|
||||||
# Scan the dir to see how many channels there are, store them in an arr.
|
# 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" | sort -t_ -n) )
|
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]*' -printf "%P\n" | sort -t"$CHANNEL_DIR_INCREMENT_SYMBOL" -n) )
|
||||||
|
|
||||||
# If this script see's there are multiple channels,
|
# If this script see's there are multiple channels,
|
||||||
# then loop through each channel and run the updates
|
# then loop through each channel and run the updates
|
||||||
|
|||||||
Reference in New Issue
Block a user