Compare commits
10 Commits
77db837c39
...
de63477ede
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de63477ede | ||
|
|
3c8e0241b1 | ||
|
|
3a4e43475a | ||
|
|
e50bf63f16 | ||
|
|
c5ad92f587 | ||
|
|
1d8ef90968 | ||
|
|
a44fc069fe | ||
|
|
6e1a85199c | ||
|
|
cb64b5749c | ||
|
|
fb35fea3e0 |
127
atom
127
atom
@ -1,15 +1,17 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
declare -r \
|
||||||
|
DOCDIR=%DOCDIR% \
|
||||||
|
LIBDIR=%LIBDIR% \
|
||||||
|
SHAREDIR=%SHAREDIR%
|
||||||
|
declare -r \
|
||||||
|
exampleconf=$DOCDIR/example.cfg \
|
||||||
|
schema=$SHAREDIR/schema.sql \
|
||||||
|
\
|
||||||
|
oldIFS="$IFS"
|
||||||
|
|
||||||
## Define exit codes
|
## Define exit codes
|
||||||
# General config errors [10-19]
|
source "$SHAREDIR"/errorcodes
|
||||||
ELOAD=10
|
|
||||||
EINTERVAL=11
|
|
||||||
ENOCFG=19
|
|
||||||
# Source cofig errors [20-29]
|
|
||||||
# Destination config errors [30-49]
|
|
||||||
EFORMAT=30
|
|
||||||
ECHANNEL=31
|
|
||||||
EFMTINVPARM=49
|
|
||||||
|
|
||||||
# config structures
|
# config structures
|
||||||
declare -A \
|
declare -A \
|
||||||
@ -36,21 +38,11 @@ declare -A \
|
|||||||
exit $EBASHVERS
|
exit $EBASHVERS
|
||||||
}
|
}
|
||||||
|
|
||||||
declare -r \
|
|
||||||
DOCDIR=%DOCDIR% \
|
|
||||||
LIBDIR=%LIBDIR% \
|
|
||||||
SHAREDIR=%SHAREDIR%
|
|
||||||
declare -r \
|
|
||||||
exampleconf=$DOCDIR/example.cfg \
|
|
||||||
schema=$SHAREDIR/schema.sql \
|
|
||||||
\
|
|
||||||
oldIFS="$IFS"
|
|
||||||
|
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
source $SHAREDIR/id3genres
|
source "$SHAREDIR"/id3genres
|
||||||
|
|
||||||
for function in "$LIBDIR"/*/*
|
for function in "$LIBDIR"/*/*
|
||||||
do
|
do
|
||||||
@ -125,12 +117,12 @@ do
|
|||||||
:)
|
:)
|
||||||
echo "-$OPTARG requires an argument"
|
echo "-$OPTARG requires an argument"
|
||||||
help
|
help
|
||||||
exit 127
|
exit $EINVARG
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unrecognized option: -$OPTARG"
|
echo "Unrecognized option: -$OPTARG"
|
||||||
help
|
help
|
||||||
exit 127
|
exit $EINVARG
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -239,8 +231,8 @@ do
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
deleted=0
|
unset deleted
|
||||||
removed=0
|
unset removed
|
||||||
echo 'BEGIN TRANSACTION;' >&3
|
echo 'BEGIN TRANSACTION;' >&3
|
||||||
for id in ${!removefile[@]}
|
for id in ${!removefile[@]}
|
||||||
do
|
do
|
||||||
@ -264,9 +256,9 @@ do
|
|||||||
done
|
done
|
||||||
echo 'COMMIT;' >&3
|
echo 'COMMIT;' >&3
|
||||||
(( cron )) || echo -n $'\r'
|
(( cron )) || echo -n $'\r'
|
||||||
echo -n "Suppressed $deleted files, $removed removed from database"
|
echo -n "${deleted+$deleted files deleted${removed:+, }}${removed:+$removed removed from database}"
|
||||||
(( cron )) || echo -ne "\033[K"
|
(( cron )) || echo -ne "\033[K"
|
||||||
echo
|
(( deleted || removed )) && echo
|
||||||
unset removecount deleted removed removefile
|
unset removecount deleted removed removefile
|
||||||
|
|
||||||
updateTags
|
updateTags
|
||||||
@ -280,7 +272,8 @@ do
|
|||||||
Update destination_files last_change 0 \
|
Update destination_files last_change 0 \
|
||||||
<<<"destination_id = $forcedestid"
|
<<<"destination_id = $forcedestid"
|
||||||
else
|
else
|
||||||
echo "Destination $forcedest does not exist!" >&2
|
echo "Full rebuild of destination $forcedest was requested," \
|
||||||
|
"but it does not exist!" >&2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -449,7 +442,7 @@ do
|
|||||||
decodefiles+=("$line::AtOM:SQL:Sep::")
|
decodefiles+=("$line::AtOM:SQL:Sep::")
|
||||||
read -u4 line
|
read -u4 line
|
||||||
done
|
done
|
||||||
(( cron )) || echo -n 'Creating tasks... '
|
(( cron )) || echo -n $'Creating tasks...\033[K'
|
||||||
|
|
||||||
(( textunidecodeneeded )) && ascii
|
(( textunidecodeneeded )) && ascii
|
||||||
|
|
||||||
@ -555,8 +548,11 @@ do
|
|||||||
tmpfile
|
tmpfile
|
||||||
done
|
done
|
||||||
echo 'COMMIT;' >&3
|
echo 'COMMIT;' >&3
|
||||||
(( cron )) || echo -n $'\r'
|
(( cron )) || echo -n $'\r\033[K'
|
||||||
echo "Created ${count:-0} tasks for $filecount files ${togo:+($togo left) }(${copies:-0} immediate copies)"
|
(( count )) \
|
||||||
|
&& echo "Created $count tasks for $filecount files \
|
||||||
|
${togo:+($togo left) } \
|
||||||
|
${copies:+($copies immediate copies)}"
|
||||||
|
|
||||||
# remove perl unicode to ascii coprocess
|
# remove perl unicode to ascii coprocess
|
||||||
(( textunidecodeneeded )) && eval exec "${toascii[1]}>&-"
|
(( textunidecodeneeded )) && eval exec "${toascii[1]}>&-"
|
||||||
@ -571,7 +567,7 @@ remaining=$taskcount
|
|||||||
failed=0
|
failed=0
|
||||||
echo 'BEGIN TRANSACTION;' >&3
|
echo 'BEGIN TRANSACTION;' >&3
|
||||||
committime=$EPOCHSECONDS
|
committime=$EPOCHSECONDS
|
||||||
while (( (remaining || ${#workers[@]}) && ! quit ))
|
while (( remaining || ${#workers[@]} ))
|
||||||
do
|
do
|
||||||
timestamp=$EPOCHSECONDS
|
timestamp=$EPOCHSECONDS
|
||||||
if (( $timestamp - committime >= 60 ))
|
if (( $timestamp - committime >= 60 ))
|
||||||
@ -585,16 +581,15 @@ do
|
|||||||
then
|
then
|
||||||
concurrency="$fixed_workers"
|
concurrency="$fixed_workers"
|
||||||
else
|
else
|
||||||
if [ -z "$quit" ] \
|
if (( timestamp - concurrencychange >= loadinterval ))
|
||||||
&& (( ! pause )) \
|
|
||||||
&& (( timestamp - concurrencychange >= loadinterval ))
|
|
||||||
then
|
then
|
||||||
if (( concurrency > 1 )) \
|
if (( concurrency > 1 || allow_zero_running )) \
|
||||||
&& (( load > maxload ))
|
&& (( load > maxload && concurrency ))
|
||||||
then
|
then
|
||||||
concurrencychange=$timestamp
|
concurrencychange=$timestamp
|
||||||
(( --concurrency ))
|
(( --concurrency ))
|
||||||
elif (( load < maxload )) && (( active > concurrency - 1 ))
|
elif (( load < maxload )) \
|
||||||
|
&& (( active > concurrency - 1 ))
|
||||||
then
|
then
|
||||||
concurrencychange=$timestamp
|
concurrencychange=$timestamp
|
||||||
(( ++concurrency ))
|
(( ++concurrency ))
|
||||||
@ -603,16 +598,11 @@ do
|
|||||||
fi
|
fi
|
||||||
checkworkers
|
checkworkers
|
||||||
cleaner
|
cleaner
|
||||||
(( pause )) || master
|
master
|
||||||
if (( ran - failed ))
|
if (( ran - failed ))
|
||||||
then
|
then
|
||||||
currenttime=$timestamp
|
currenttime=$timestamp
|
||||||
if (( pause ))
|
(( runtime = currenttime - starttime ))
|
||||||
then
|
|
||||||
(( runtime = pausestart - starttime - pausedtime ))
|
|
||||||
else
|
|
||||||
(( runtime = currenttime - starttime - pausedtime ))
|
|
||||||
fi
|
|
||||||
avgduration=$((
|
avgduration=$((
|
||||||
( runtime * 1000)
|
( runtime * 1000)
|
||||||
/
|
/
|
||||||
@ -648,11 +638,7 @@ do
|
|||||||
fmtprogress="T:%${#taskcount}i/%i (F:%i) %3i%%"
|
fmtprogress="T:%${#taskcount}i/%i (F:%i) %3i%%"
|
||||||
fmttime='%2id %2ih%02im%02is (A:%4.1fs/task)'
|
fmttime='%2id %2ih%02im%02is (A:%4.1fs/task)'
|
||||||
eta="ETA:$(
|
eta="ETA:$(
|
||||||
date -d "${days:-0} days
|
printf "%(%c)T" "$(( currenttime + secsremaining ))"
|
||||||
${hours:-0} hours
|
|
||||||
${minutes:-0} minutes
|
|
||||||
${seconds:-0} seconds" \
|
|
||||||
+'%d/%m %H:%M:%S'
|
|
||||||
)"
|
)"
|
||||||
(( cron )) || printf \
|
(( cron )) || printf \
|
||||||
"\r$fmtload $fmtworkers $fmtprogress $fmttime $eta\033[K"\
|
"\r$fmtload $fmtworkers $fmtprogress $fmttime $eta\033[K"\
|
||||||
@ -669,7 +655,7 @@ do
|
|||||||
${minutes:-0} \
|
${minutes:-0} \
|
||||||
${seconds:-0} \
|
${seconds:-0} \
|
||||||
${avgdsec:-0}.${avgdmsec:-0}
|
${avgdsec:-0}.${avgdmsec:-0}
|
||||||
if (( pause ))
|
if ! (( concurrency )) && ! (( cron ))
|
||||||
then
|
then
|
||||||
if (( active ))
|
if (( active ))
|
||||||
then
|
then
|
||||||
@ -684,22 +670,25 @@ unset count
|
|||||||
|
|
||||||
endtime=$EPOCHSECONDS
|
endtime=$EPOCHSECONDS
|
||||||
|
|
||||||
(( elapsedseconds = endtime - starttime - pausedtime ))
|
(( elapsedseconds = endtime - starttime ))
|
||||||
(( days =
|
(( days =
|
||||||
elapsedseconds
|
elapsedseconds
|
||||||
/
|
/
|
||||||
( 24*60*60 )
|
( 24*60*60 )
|
||||||
)) || true
|
)) || true
|
||||||
|
(( days )) || unset days
|
||||||
(( hours =
|
(( hours =
|
||||||
( elapsedseconds - ( days*24*60*60 ) )
|
( elapsedseconds - ( days*24*60*60 ) )
|
||||||
/
|
/
|
||||||
( 60*60 )
|
( 60*60 )
|
||||||
)) || true
|
)) || true
|
||||||
|
(( days && hours )) || unset hours
|
||||||
(( minutes =
|
(( minutes =
|
||||||
( elapsedseconds - ( ( days*24 + hours ) *60*60 ) )
|
( elapsedseconds - ( ( days*24 + hours ) *60*60 ) )
|
||||||
/
|
/
|
||||||
60
|
60
|
||||||
)) || true
|
)) || true
|
||||||
|
(( days && hours && minutes )) || unset minutes
|
||||||
(( seconds =
|
(( seconds =
|
||||||
elapsedseconds
|
elapsedseconds
|
||||||
-
|
-
|
||||||
@ -707,10 +696,15 @@ endtime=$EPOCHSECONDS
|
|||||||
)) || true
|
)) || true
|
||||||
|
|
||||||
(( cron )) || echo -n $'\r'
|
(( cron )) || echo -n $'\r'
|
||||||
echo -n "Ran ${ran:=0} tasks, $failed of which failed, in $days" \
|
(( ran )) \
|
||||||
"days, $hours hours, $minutes minutes and $seconds seconds."
|
&& echo -n "Ran $ran tasks${failed:+, $failed of which failed,} \
|
||||||
|
in ${days:+$days days,} \
|
||||||
|
${hours:+$hours hours,} \
|
||||||
|
${minutes:+$minutes minutes and} \
|
||||||
|
$seconds seconds."
|
||||||
(( cron )) || echo -en "\033[K"
|
(( cron )) || echo -en "\033[K"
|
||||||
echo
|
(( ran )) && echo
|
||||||
|
|
||||||
if (( failed ))
|
if (( failed ))
|
||||||
then
|
then
|
||||||
echo $'\nFailed tasks:\n'
|
echo $'\nFailed tasks:\n'
|
||||||
@ -793,17 +787,10 @@ then
|
|||||||
echo "${line%%::AtOM:SQL:Sep::*}"
|
echo "${line%%::AtOM:SQL:Sep::*}"
|
||||||
line="${line#*::AtOM:SQL:Sep::}"
|
line="${line#*::AtOM:SQL:Sep::}"
|
||||||
line="${line//::AtOM:SQL:Sep::/ }"
|
line="${line//::AtOM:SQL:Sep::/ }"
|
||||||
echo $'\t'"${line/+( )$/}"
|
echo $'\t'"${line/+( )$/}"$'\n'
|
||||||
echo
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$quit" ]
|
|
||||||
then
|
|
||||||
closeDatabase
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
for destination in "${!destinationpath[@]}"
|
for destination in "${!destinationpath[@]}"
|
||||||
do
|
do
|
||||||
echo '
|
echo '
|
||||||
@ -917,7 +904,7 @@ do
|
|||||||
"${destinationfat32compat["$destination"]}," \
|
"${destinationfat32compat["$destination"]}," \
|
||||||
" ascii=" \
|
" ascii=" \
|
||||||
"${destinationascii["$destination"]}" \
|
"${destinationascii["$destination"]}" \
|
||||||
"WHERE id=$destfileid;" \
|
"WHERE id=$destfileid;" \
|
||||||
>&3
|
>&3
|
||||||
if (( commit ))
|
if (( commit ))
|
||||||
then
|
then
|
||||||
@ -930,9 +917,10 @@ do
|
|||||||
(( textunidecodeneeded )) && eval exec "${toascii[1]}>&-"
|
(( textunidecodeneeded )) && eval exec "${toascii[1]}>&-"
|
||||||
echo 'COMMIT;' >&3
|
echo 'COMMIT;' >&3
|
||||||
(( cron )) || echo -n $'\r'
|
(( cron )) || echo -n $'\r'
|
||||||
echo -n "$destination: Renamed ${changedcount:-0} files"
|
(( changedcount )) \
|
||||||
|
&& echo -n "$destination: Renamed $changedcount files"
|
||||||
(( cron )) || echo -en "\033[K"
|
(( cron )) || echo -en "\033[K"
|
||||||
echo
|
(( changedcount )) && echo
|
||||||
fi
|
fi
|
||||||
unset count changedcount renamefiles
|
unset count changedcount renamefiles
|
||||||
done
|
done
|
||||||
@ -953,7 +941,7 @@ echo '
|
|||||||
SELECT "AtOM:NoMoreFiles";
|
SELECT "AtOM:NoMoreFiles";
|
||||||
' >&3
|
' >&3
|
||||||
|
|
||||||
(( cron )) || echo -n 'Removing obsolete files... '
|
(( cron )) || echo -n 'Removing obsolete files...'$'\033[K'
|
||||||
lines=()
|
lines=()
|
||||||
read -u4 line
|
read -u4 line
|
||||||
while [[ $line != AtOM:NoMoreFiles ]]
|
while [[ $line != AtOM:NoMoreFiles ]]
|
||||||
@ -980,11 +968,12 @@ do
|
|||||||
done
|
done
|
||||||
echo 'COMMIT;' >&3
|
echo 'COMMIT;' >&3
|
||||||
(( cron )) || echo -n $'\r'
|
(( cron )) || echo -n $'\r'
|
||||||
echo -n "Removed ${count:-0} obsolete files."
|
(( count )) \
|
||||||
|
&& echo -n "Removed $count obsolete files."
|
||||||
(( cron )) || echo -en "\033[K"
|
(( cron )) || echo -en "\033[K"
|
||||||
echo
|
(( count )) && echo
|
||||||
|
|
||||||
echo "Purging empty directories."
|
(( debug )) && echo "Purging empty directories..."
|
||||||
for path in "${destinationpath[@]}"
|
for path in "${destinationpath[@]}"
|
||||||
do
|
do
|
||||||
find "$path" -type d -empty -delete
|
find "$path" -type d -empty -delete
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
copyFiles_action() {
|
copyFiles_action() {
|
||||||
(( cron )) || echo -n "Copying files... "
|
(( cron )) || echo -n $'Copying files...\033[K'
|
||||||
echo '
|
echo '
|
||||||
SELECT
|
SELECT
|
||||||
source_files.filename,
|
source_files.filename,
|
||||||
@ -79,15 +79,29 @@ copyFiles_action() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if cp -al "$sourcepath/$sourcefilename" "$destdir" 2>/dev/null\
|
if cp -a --reflink=always \
|
||||||
|| cp -a "$sourcepath/$sourcefilename" "$destdir"
|
"$sourcepath/$sourcefilename" \
|
||||||
|
"$destdir" \
|
||||||
|
2>/dev/null \
|
||||||
|
|| cp -al \
|
||||||
|
"$sourcepath/$sourcefilename" \
|
||||||
|
"$destdir" \
|
||||||
|
2>/dev/null \
|
||||||
|
|| cp -a \
|
||||||
|
"$sourcepath/$sourcefilename" \
|
||||||
|
"$destdir"
|
||||||
then
|
then
|
||||||
Update destination_files \
|
Update destination_files \
|
||||||
filename "$destdir/${sourcefilename##*/}"\
|
filename \
|
||||||
rename_pattern "${destinationrenamepath[$destination]}/${destinationrename[$destination]}"\
|
"$destdir/${sourcefilename##*/}"\
|
||||||
fat32compat ${destinationfat32compat["$destination"]}\
|
rename_pattern \
|
||||||
ascii ${destinationascii["$destination"]}\
|
"${destinationrenamepath[$destination]}/${destinationrename[$destination]}"\
|
||||||
last_change $lastchange \
|
fat32compat \
|
||||||
|
${destinationfat32compat["$destination"]}\
|
||||||
|
ascii \
|
||||||
|
${destinationascii["$destination"]}\
|
||||||
|
last_change \
|
||||||
|
$lastchange \
|
||||||
<<-EOWhere
|
<<-EOWhere
|
||||||
id = $destfileid
|
id = $destfileid
|
||||||
EOWhere
|
EOWhere
|
||||||
@ -98,12 +112,12 @@ copyFiles_action() {
|
|||||||
if (( count ))
|
if (( count ))
|
||||||
then
|
then
|
||||||
(( cron )) || echo -n $'\r'
|
(( cron )) || echo -n $'\r'
|
||||||
echo -n "Copied ${done:-0} of $count" \
|
echo -n "Copied ${done:-0} of $count" \
|
||||||
"files${postponed+ ($postponed postponed)}."
|
"files${postponed+ ($postponed postponed)}."
|
||||||
(( cron )) || echo -en "\033[K"
|
(( cron )) || echo -en "\033[K"
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
(( cron )) || echo -e "\rNothing to copy.\033[K"
|
(( cron )) || echo -n $'\r\033[K'
|
||||||
fi
|
fi
|
||||||
unset count done
|
unset count done
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ checkDatabaseVersion() {
|
|||||||
echo "Database schema version $dbversion is higher than
|
echo "Database schema version $dbversion is higher than
|
||||||
that of this version of AtOM
|
that of this version of AtOM
|
||||||
($currentdbversion). Bailing out." >&2
|
($currentdbversion). Bailing out." >&2
|
||||||
exit 1
|
exit $EDBVERSION
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
Insert atom 1 <<<"version $currentdbversion"
|
Insert atom 1 <<<"version $currentdbversion"
|
||||||
|
|||||||
@ -67,6 +67,10 @@ getFiles() {
|
|||||||
)
|
)
|
||||||
echo 'COMMIT;' >&3
|
echo 'COMMIT;' >&3
|
||||||
(( cron )) || echo -n $'\r'
|
(( cron )) || echo -n $'\r'
|
||||||
echo "${count:-0} files found, ${new:=0} new or changed."$'\033[K'
|
if (( count ))
|
||||||
|
then
|
||||||
|
echo "$count files found${new:+, $new new or changed}." \
|
||||||
|
$'\033[K'
|
||||||
|
fi
|
||||||
unset count
|
unset count
|
||||||
}
|
}
|
||||||
|
|||||||
@ -206,8 +206,8 @@ echo '
|
|||||||
done
|
done
|
||||||
echo 'COMMIT;' >&3
|
echo 'COMMIT;' >&3
|
||||||
(( cron )) || echo -n $'\r'
|
(( cron )) || echo -n $'\r'
|
||||||
echo -n "Read tags from ${count:-0} files."
|
(( count )) && echo -n "Read tags from $count files."
|
||||||
(( cron )) || echo -ne "\033[K"
|
(( cron )) || echo -n $'\033[K'
|
||||||
echo
|
(( count )) && echo
|
||||||
unset count tagfiles
|
unset count tagfiles
|
||||||
}
|
}
|
||||||
|
|||||||
@ -220,7 +220,7 @@ master() {
|
|||||||
echo "Waiting for children to come back home..."
|
echo "Waiting for children to come back home..."
|
||||||
wait
|
wait
|
||||||
echo $'\nGood luck!'
|
echo $'\nGood luck!'
|
||||||
exit 1
|
exit $ETASKLEFT
|
||||||
elif (( ready == 0 ))
|
elif (( ready == 0 ))
|
||||||
then
|
then
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
|
|||||||
24
share/errorcodes
Normal file
24
share/errorcodes
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## Define exit codes
|
||||||
|
# General config errors [10-19]
|
||||||
|
EDBVERSION=10
|
||||||
|
ELOAD=11
|
||||||
|
EINTERVAL=12
|
||||||
|
ELOAD=13
|
||||||
|
EIONICE=14
|
||||||
|
ENOCFG=19
|
||||||
|
# Source cofig errors [20-29]
|
||||||
|
# Destination config errors [30-49]
|
||||||
|
EFORMAT=30
|
||||||
|
ECHANNEL=31
|
||||||
|
EQUALITY=32
|
||||||
|
EMAXBPS=33
|
||||||
|
EINVDEST=34
|
||||||
|
EFMTINVPARM=49
|
||||||
|
# Tasks
|
||||||
|
ETASKLEFT=50
|
||||||
|
# Sanity
|
||||||
|
ESANITY=60
|
||||||
|
# Invalid arguments
|
||||||
|
EINVARG=127
|
||||||
@ -8,6 +8,19 @@ EOWarn
|
|||||||
|
|
||||||
read -p "Press Enter to continue or Ctrl-C to abort"
|
read -p "Press Enter to continue or Ctrl-C to abort"
|
||||||
|
|
||||||
|
declare -r \
|
||||||
|
DOCDIR=%DOCDIR% \
|
||||||
|
LIBDIR=%LIBDIR% \
|
||||||
|
SHAREDIR=%SHAREDIR%
|
||||||
|
declare -r \
|
||||||
|
exampleconf=$DOCDIR/example.cfg \
|
||||||
|
schema=$SHAREDIR/schema.sql \
|
||||||
|
\
|
||||||
|
oldIFS="$IFS"
|
||||||
|
|
||||||
|
## Define exit codes
|
||||||
|
source "$SHAREDIR"/errorcodes
|
||||||
|
|
||||||
# config structures
|
# config structures
|
||||||
declare -A \
|
declare -A \
|
||||||
destinationchannels \
|
destinationchannels \
|
||||||
@ -30,16 +43,6 @@ declare -A \
|
|||||||
exit $EBASHVERS
|
exit $EBASHVERS
|
||||||
}
|
}
|
||||||
|
|
||||||
declare -r \
|
|
||||||
DOCDIR=%DOCDIR% \
|
|
||||||
LIBDIR=%LIBDIR% \
|
|
||||||
SHAREDIR=%SHAREDIR%
|
|
||||||
declare -r \
|
|
||||||
exampleconf=$DOCDIR/example.cfg \
|
|
||||||
schema=$SHAREDIR/schema.sql \
|
|
||||||
\
|
|
||||||
oldIFS="$IFS"
|
|
||||||
|
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|||||||
@ -1,5 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
declare -r \
|
||||||
|
DOCDIR=%DOCDIR% \
|
||||||
|
LIBDIR=%LIBDIR% \
|
||||||
|
SHAREDIR=%SHAREDIR%
|
||||||
|
declare -r \
|
||||||
|
exampleconf=$DOCDIR/example.cfg \
|
||||||
|
schema=$SHAREDIR/schema.sql \
|
||||||
|
\
|
||||||
|
oldIFS="$IFS"
|
||||||
|
|
||||||
|
## Define exit codes
|
||||||
|
source "$SHAREDIR"/errorcodes
|
||||||
|
|
||||||
# config structures
|
# config structures
|
||||||
declare -A \
|
declare -A \
|
||||||
destinationchannels \
|
destinationchannels \
|
||||||
@ -22,16 +35,6 @@ declare -A \
|
|||||||
exit $EBASHVERS
|
exit $EBASHVERS
|
||||||
}
|
}
|
||||||
|
|
||||||
declare -r \
|
|
||||||
DOCDIR=%DOCDIR% \
|
|
||||||
LIBDIR=%LIBDIR% \
|
|
||||||
SHAREDIR=%SHAREDIR%
|
|
||||||
declare -r \
|
|
||||||
exampleconf=$DOCDIR/example.cfg \
|
|
||||||
schema=$SHAREDIR/schema.sql \
|
|
||||||
\
|
|
||||||
oldIFS="$IFS"
|
|
||||||
|
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|||||||
@ -1,5 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
declare -r \
|
||||||
|
DOCDIR=%DOCDIR% \
|
||||||
|
LIBDIR=%LIBDIR% \
|
||||||
|
SHAREDIR=%SHAREDIR%
|
||||||
|
declare -r \
|
||||||
|
exampleconf=$DOCDIR/example.cfg \
|
||||||
|
schema=$SHAREDIR/schema.sql \
|
||||||
|
\
|
||||||
|
oldIFS="$IFS"
|
||||||
|
|
||||||
|
## Define exit codes
|
||||||
|
source "$SHAREDIR"/errorcodes
|
||||||
|
|
||||||
# config structures
|
# config structures
|
||||||
declare -A \
|
declare -A \
|
||||||
destinationchannels \
|
destinationchannels \
|
||||||
@ -22,16 +35,6 @@ declare -A \
|
|||||||
exit $EBASHVERS
|
exit $EBASHVERS
|
||||||
}
|
}
|
||||||
|
|
||||||
declare -r \
|
|
||||||
DOCDIR=%DOCDIR% \
|
|
||||||
LIBDIR=%LIBDIR% \
|
|
||||||
SHAREDIR=%SHAREDIR%
|
|
||||||
declare -r \
|
|
||||||
exampleconf=$DOCDIR/example.cfg \
|
|
||||||
schema=$SHAREDIR/schema.sql \
|
|
||||||
\
|
|
||||||
oldIFS="$IFS"
|
|
||||||
|
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|||||||
@ -1,5 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
declare -r \
|
||||||
|
DOCDIR=%DOCDIR% \
|
||||||
|
LIBDIR=%LIBDIR% \
|
||||||
|
SHAREDIR=%SHAREDIR%
|
||||||
|
declare -r \
|
||||||
|
exampleconf=$DOCDIR/example.cfg \
|
||||||
|
schema=$SHAREDIR/schema.sql \
|
||||||
|
\
|
||||||
|
oldIFS="$IFS"
|
||||||
|
|
||||||
|
## Define exit codes
|
||||||
|
source "$SHAREDIR"/errorcodes
|
||||||
|
|
||||||
# config structures
|
# config structures
|
||||||
declare -A \
|
declare -A \
|
||||||
destinationchannels \
|
destinationchannels \
|
||||||
@ -22,16 +35,6 @@ declare -A \
|
|||||||
exit $EBASHVERS
|
exit $EBASHVERS
|
||||||
}
|
}
|
||||||
|
|
||||||
declare -r \
|
|
||||||
DOCDIR=%DOCDIR% \
|
|
||||||
LIBDIR=%LIBDIR% \
|
|
||||||
SHAREDIR=%SHAREDIR%
|
|
||||||
declare -r \
|
|
||||||
exampleconf=$DOCDIR/example.cfg \
|
|
||||||
schema=$SHAREDIR/schema.sql \
|
|
||||||
\
|
|
||||||
oldIFS="$IFS"
|
|
||||||
|
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|||||||
@ -1,6 +1,17 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
#!/bin/bash
|
declare -r \
|
||||||
|
DOCDIR=%DOCDIR% \
|
||||||
|
LIBDIR=%LIBDIR% \
|
||||||
|
SHAREDIR=%SHAREDIR%
|
||||||
|
declare -r \
|
||||||
|
exampleconf=$DOCDIR/example.cfg \
|
||||||
|
schema=$SHAREDIR/schema.sql \
|
||||||
|
\
|
||||||
|
oldIFS="$IFS"
|
||||||
|
|
||||||
|
## Define exit codes
|
||||||
|
source "$SHAREDIR"/errorcodes
|
||||||
|
|
||||||
# config structures
|
# config structures
|
||||||
declare -A \
|
declare -A \
|
||||||
@ -24,16 +35,6 @@ declare -A \
|
|||||||
exit $EBASHVERS
|
exit $EBASHVERS
|
||||||
}
|
}
|
||||||
|
|
||||||
declare -r \
|
|
||||||
DOCDIR=%DOCDIR% \
|
|
||||||
LIBDIR=%LIBDIR% \
|
|
||||||
SHAREDIR=%SHAREDIR%
|
|
||||||
declare -r \
|
|
||||||
exampleconf=$DOCDIR/example.cfg \
|
|
||||||
schema=$SHAREDIR/schema.sql \
|
|
||||||
\
|
|
||||||
oldIFS="$IFS"
|
|
||||||
|
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|||||||
@ -1,5 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
declare -r \
|
||||||
|
DOCDIR=%DOCDIR% \
|
||||||
|
LIBDIR=%LIBDIR% \
|
||||||
|
SHAREDIR=%SHAREDIR%
|
||||||
|
declare -r \
|
||||||
|
exampleconf=$DOCDIR/example.cfg \
|
||||||
|
schema=$SHAREDIR/schema.sql \
|
||||||
|
\
|
||||||
|
oldIFS="$IFS"
|
||||||
|
|
||||||
|
## Define exit codes
|
||||||
|
source "$SHAREDIR"/errorcodes
|
||||||
|
|
||||||
# config structures
|
# config structures
|
||||||
declare -A \
|
declare -A \
|
||||||
destinationchannels \
|
destinationchannels \
|
||||||
@ -22,16 +35,6 @@ declare -A \
|
|||||||
exit $EBASHVERS
|
exit $EBASHVERS
|
||||||
}
|
}
|
||||||
|
|
||||||
declare -r \
|
|
||||||
DOCDIR=%DOCDIR% \
|
|
||||||
LIBDIR=%LIBDIR% \
|
|
||||||
SHAREDIR=%SHAREDIR%
|
|
||||||
declare -r \
|
|
||||||
exampleconf=$DOCDIR/example.cfg \
|
|
||||||
schema=$SHAREDIR/schema.sql \
|
|
||||||
\
|
|
||||||
oldIFS="$IFS"
|
|
||||||
|
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|||||||
@ -1,5 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
declare -r \
|
||||||
|
DOCDIR=%DOCDIR% \
|
||||||
|
LIBDIR=%LIBDIR% \
|
||||||
|
SHAREDIR=%SHAREDIR%
|
||||||
|
declare -r \
|
||||||
|
exampleconf=$DOCDIR/example.cfg \
|
||||||
|
schema=$SHAREDIR/schema.sql \
|
||||||
|
\
|
||||||
|
oldIFS="$IFS"
|
||||||
|
|
||||||
|
## Define exit codes
|
||||||
|
source "$SHAREDIR"/errorcodes
|
||||||
|
|
||||||
# config structures
|
# config structures
|
||||||
declare -A \
|
declare -A \
|
||||||
destinationchannels \
|
destinationchannels \
|
||||||
@ -23,16 +36,6 @@ declare -A \
|
|||||||
exit $EBASHVERS
|
exit $EBASHVERS
|
||||||
}
|
}
|
||||||
|
|
||||||
declare -r \
|
|
||||||
DOCDIR=%DOCDIR% \
|
|
||||||
LIBDIR=%LIBDIR% \
|
|
||||||
SHAREDIR=%SHAREDIR%
|
|
||||||
declare -r \
|
|
||||||
exampleconf=$DOCDIR/example.cfg \
|
|
||||||
schema=$SHAREDIR/schema.sql \
|
|
||||||
\
|
|
||||||
oldIFS="$IFS"
|
|
||||||
|
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user