add shebang on lib files

This commit is contained in:
Vincent Riquer 2013-04-08 02:52:56 +02:00
parent 9fe99d98dd
commit 1a9758a251
49 changed files with 49 additions and 0 deletions

View File

@ -1,3 +1,4 @@
#!/bin/bash
getConfig() {
while read key value
do

View File

@ -1,3 +1,4 @@
#!/bin/bash
getConfigDestination() {
case "$key" in
'path')

View File

@ -1,3 +1,4 @@
#!/bin/bash
getConfigGeneral() {
case $key in
'max-load')

View File

@ -1,3 +1,4 @@
#!/bin/bash
getConfigSource() {
case "$key" in
'path')

View File

@ -1,3 +1,4 @@
#!/bin/bash
printConfig() {
{
cat <<-EOF

View File

@ -1,3 +1,4 @@
#!/bin/bash
checkCopy() {
(
[ -z "${destinationfrequency[$destination]}" ] \

View File

@ -1,3 +1,4 @@
#!/bin/bash
copyFiles_action() {
echo '
SELECT

View File

@ -1,3 +1,4 @@
#!/bin/bash
copyFiles_matching() {
extension="${filename##*.}"
cp -al \

View File

@ -1,3 +1,4 @@
#!/bin/bash
Delete() {
#Delete table < where_key where_operator where_value
# [where_key where_operator where_value

View File

@ -1,3 +1,4 @@
#!/bin/bash
Insert() {
#Insert table [no_id] < key value
# [key value

View File

@ -1,3 +1,4 @@
#!/bin/bash
InsertIfUnset() {
#InsertIfUnset table [no_id] < key value \n key value
local \

View File

@ -1,3 +1,4 @@
#!/bin/bash
InsertOrUpdate() {
#InsertOrUpdate table set_key set_value [set_key set_value […]] < where_key where_value
# [where_key where_value

View File

@ -1,3 +1,4 @@
#!/bin/bash
Select() {
#Select table [col1 [col2 [..]]] < WHERE_key WHERE_operator WHERE_value
# [WHERE_key WHERE_operator WHERE_value

View File

@ -1,3 +1,4 @@
#!/bin/bash
Update() {
#Update table set_key set_value [set_key set_value […]] < where_key where_operator where_value
# [where_key where_operator where_value

View File

@ -1,3 +1,4 @@
#!/bin/bash
closeDatabase() {
echo .quit >&3
(( debug )) && echo -n "Waiting for SQLite to terminate... "

View File

@ -1,3 +1,4 @@
#!/bin/bash
openDatabase() {
if [ ! -d "$tempdir" ]
then

View File

@ -1,3 +1,4 @@
#!/bin/bash
decodeFile() {
if ! decodetaskid=$(
Select tasks id <<<"key = $tmpfile"

View File

@ -1,3 +1,4 @@
#!/bin/bash
decodeMpcdec() {
tmpfile="${fileid}mpcdec"
commandline=(mpcdec "$sourcepath/$filename" "$tempdir/$tmpfile.wav")

View File

@ -1,3 +1,4 @@
#!/bin/bash
decodeOpusdec() {
tmpfile="${fileid}opusdec"
commandline=(opusdec "$sourcepath/$filename" "$tempdir/$tmpfile.wav")

View File

@ -1,3 +1,4 @@
#!/bin/bash
decodeSox() {
commandline=(sox --single-threaded --temp "$tempdir")
soxoptions_in=''

View File

@ -1,3 +1,4 @@
#!/bin/bash
createDestinations() {
for destination in ${!destinationpath[@]}
do

View File

@ -1,3 +1,4 @@
#!/bin/bash
updateMimes() {
Update mime_actions action 1 <<<"action != 1"
for destination in ${!destinationskipmime[@]}

View File

@ -1,3 +1,4 @@
#!/bin/bash
encodeFile::mp3() {
lameopts=(lame --quiet -v --abr ${destinationquality[$destination]})
[ -n "$album" ] && lameopts+=(--tl "$album" )

View File

@ -1,3 +1,4 @@
#!/bin/bash
encodeFile::opus() {
opusencopts=(opusenc --music --quiet)
opusencopts+=(--bitrate ${destinationquality[$destination]})

View File

@ -1,3 +1,4 @@
#!/bin/bash
encodeFile::vorbis() {
oggencopts=(oggenc -Q -q ${destinationquality[$destination]})
[ -n "$albumartist" ] && oggencopts+=(-c "ALBUMARTIST=$albumartist")

View File

@ -1,3 +1,4 @@
#!/bin/bash
getDestDir() {
destdir="${destinationpath[$destination]}/"
if [ -n "${destinationrenamepath[$destination]}" ]

View File

@ -1,3 +1,4 @@
#!/bin/bash
getDestFile() {
if [ -n "${destinationrename[$destination]}" ]
then

View File

@ -1,3 +1,4 @@
#!/bin/bash
getFiles() {
scantime=$(date +%s)
for prune_expression in "${skippeddirectories[@]}"

View File

@ -1,3 +1,4 @@
#!/bin/bash
removeObsoleteFiles() {
Delete source_files <<-EOWhere
last_seen < $scantime

View File

@ -1,3 +1,4 @@
#!/bin/bash
sanitizeFile() {
shopt -s extglob
string="$1"

View File

@ -1,3 +1,4 @@
#!/bin/bash
getInfosAPE_version='APE-1'
tagreaders+=( "$getInfosAPE_version" )
getInfos::APE() {

View File

@ -1,3 +1,4 @@
#!/bin/bash
getInfosFLAC_version='FLAC-1'
tagreaders+=( "$getInfosFLAC_version" )
getInfos::FLAC() {

View File

@ -1,3 +1,4 @@
#!/bin/bash
getInfosMP3_version='ID3-2'
tagreaders+=( "$getInfosMP3_version" )
getInfos::MP3() {

View File

@ -1,3 +1,4 @@
#!/bin/bash
getInfosOgg_version='Ogg-1'
tagreaders+=( "$getInfosOgg_version" )
getInfos::Ogg() {

View File

@ -1,3 +1,4 @@
#!/bin/bash
getInfosOpus_version='Opus-1'
tagreaders+=( "$getInfosOpus_version" )
getInfos::Opus() {

View File

@ -1,3 +1,4 @@
#!/bin/bash
getRateChannelMPC() {
while read key value garbage
do

View File

@ -1,3 +1,4 @@
#!/bin/bash
getRateChannelSoxi() {
rate=$(soxi -r "$sourcepath/$filename" 2>/dev/null)
channels=$(soxi -c "$sourcepath/$filename" 2>/dev/null)

View File

@ -1,3 +1,4 @@
#!/bin/bash
getTags_version='unknown-2'
tagreaders+=( "$getTags_version" )
getTags() {

View File

@ -1,3 +1,4 @@
#!/bin/bash
gettag() {
echo -e "$infos" \
| sed -n "/^${1}=/I{s/^${1}=//I;p;q}"

View File

@ -1,3 +1,4 @@
#!/bin/bash
tryAPE() {
grep -q 'APETAGEX' \
"$sourcepath/$filename" \

View File

@ -1,3 +1,4 @@
#!/bin/bash
gettaskinfos() {
echo '
SELECT

View File

@ -1,3 +1,4 @@
#!/bin/bash
progressSpin() {
case $(( ++count % 40 )) in
0) echo -ne '\b|' ;;

View File

@ -1,3 +1,4 @@
#!/bin/bash
checkworkers() {
for key in ${!workers[@]}
do

View File

@ -1,3 +1,4 @@
#!/bin/bash
cleaner() {
for key in ${!failedtasks[@]}
do

View File

@ -1,3 +1,4 @@
#!/bin/bash
createworker() {
worker $1 &
workers[$1]=$!

View File

@ -1,3 +1,4 @@
#!/bin/bash
destroyworker() {
dyingworker=${workers[$1]}
unset workers[$1]

View File

@ -1,3 +1,4 @@
#!/bin/bash
getworkerid() {
local i
for (( i=0 ; i >= 0 ; i++ ))

View File

@ -1,3 +1,4 @@
#!/bin/bash
master() {
if (( active >= concurrency)) || [ -n "$quit" ]
then

View File

@ -1,3 +1,4 @@
#!/bin/bash
worker() {
exec 2>>"$tempdir/worker$1.log"
(( debug >= 2 )) && echo "${cmd_arg[@]}" >&2