formatting

This commit is contained in:
LooseSeal2
2019-07-17 01:00:02 -07:00
parent 067ef0515b
commit e3c685e5b9
52 changed files with 567 additions and 428 deletions

View File

@@ -7,23 +7,23 @@
################################################################################
# BAD INPUT
badinput () {
echo
read -p '⛔️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed < /dev/tty
question1
badinput() {
echo
read -p '⛔️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question1
}
# FUNCTION - ONE
question1 () {
question1() {
# Recall Program
image=$(cat /tmp/program_var)
# Recall Program
image=$(cat /tmp/program_var)
# Checks Image List
file="/opt/communityapps/apps/image/$image"
if [ ! -e "$file" ]; then exit; fi
# Checks Image List
file="/opt/communityapps/apps/image/$image"
if [ ! -e "$file" ]; then exit; fi
tee <<-EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌵 PG Multi Image Selector - $image
@@ -31,19 +31,19 @@ tee <<-EOF
EOF
count=1
while read p; do
echo "$count - $p"
echo "$p" > /tmp/display$count
count=$[count+1]
done </opt/communityapps/apps/image/$image
echo ""
read -p '🚀 Type Number | PRESS [ENTER]: ' typed < /dev/tty
count=1
while read p; do
echo "$count - $p"
echo "$p" >/tmp/display$count
count=$((count + 1))
done </opt/communityapps/apps/image/$image
echo ""
read -p '🚀 Type Number | PRESS [ENTER]: ' typed </dev/tty
if [[ "$typed" -ge "1" && "$typed" -lt "$count" ]]; then
mkdir -p /var/plexguide/image
cat "/tmp/display$typed" > "/var/plexguide/image/$image"
else badinput; fi
mkdir -p /var/plexguide/image
cat "/tmp/display$typed" >"/var/plexguide/image/$image"
else badinput; fi
}
# END OF FUNCTIONS ############################################################