Compare commits
5 Commits
de63477ede
...
77db837c39
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77db837c39 | ||
|
|
66bdede3e8 | ||
|
|
e7bcb49196 | ||
|
|
c68ec5388d | ||
|
|
ac8908b045 |
36
atom
36
atom
@ -1,17 +1,15 @@
|
|||||||
#!/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
|
||||||
source "$SHAREDIR"/errorcodes
|
# General config errors [10-19]
|
||||||
|
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 \
|
||||||
@ -38,11 +36,21 @@ 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
|
||||||
@ -117,12 +125,12 @@ do
|
|||||||
:)
|
:)
|
||||||
echo "-$OPTARG requires an argument"
|
echo "-$OPTARG requires an argument"
|
||||||
help
|
help
|
||||||
exit $EINVARG
|
exit 127
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unrecognized option: -$OPTARG"
|
echo "Unrecognized option: -$OPTARG"
|
||||||
help
|
help
|
||||||
exit $EINVARG
|
exit 127
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
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 $EDBVERSION
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
Insert atom 1 <<<"version $currentdbversion"
|
Insert atom 1 <<<"version $currentdbversion"
|
||||||
|
|||||||
@ -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 $ETASKLEFT
|
exit 1
|
||||||
elif (( ready == 0 ))
|
elif (( ready == 0 ))
|
||||||
then
|
then
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
|
|||||||
@ -1,24 +0,0 @@
|
|||||||
#!/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,19 +8,6 @@ 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 \
|
||||||
@ -43,6 +30,16 @@ 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,18 +1,5 @@
|
|||||||
#!/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 \
|
||||||
@ -35,6 +22,16 @@ 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,18 +1,5 @@
|
|||||||
#!/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 \
|
||||||
@ -35,6 +22,16 @@ 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,18 +1,5 @@
|
|||||||
#!/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 \
|
||||||
@ -35,6 +22,16 @@ 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,17 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
declare -r \
|
#!/bin/bash
|
||||||
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 \
|
||||||
@ -35,6 +24,16 @@ 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,18 +1,5 @@
|
|||||||
#!/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 \
|
||||||
@ -35,6 +22,16 @@ 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,18 +1,5 @@
|
|||||||
#!/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 \
|
||||||
@ -36,6 +23,16 @@ 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