Wrapper script for hpodder
parent
ee58c8ddc6
commit
59076aeeb3
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
logdir="/tmp/hpodder/"
|
||||
logfile="$logdir`whoami`.`date +%F`.log"
|
||||
lockfile="$logdir/lock.log"
|
||||
dir=`dirname $0`
|
||||
|
||||
if [[ ! -d $logdir ]]; then
|
||||
echo "Log directory doesn't exist, create it '$lockfile'"
|
||||
mkdir -p $logdir
|
||||
chmod 777 $logdir
|
||||
fi
|
||||
|
||||
if [[ -f $lockfile ]]; then
|
||||
echo "Exit, stale lock file found $lockfile"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
touch $lockfile
|
||||
hpodder fetch >> $logfile
|
||||
$dir/prefix-date ~/podcasts/ >> $logfile
|
||||
rm $lockfile
|
||||
|
Loading…
Reference in New Issue