Added download folder location
This commit is contained in:
parent
a464e9014a
commit
709881566a
@ -3,7 +3,7 @@
|
||||
echo "----> Starting Download of all LEGO instructions from https://brickset.com/exportscripts/instructions"
|
||||
firstline=0
|
||||
logfile="lego_errors.log"
|
||||
|
||||
downloadFolder="Instructions"
|
||||
#error_level:
|
||||
# 0 no errors reported
|
||||
# 1 Download errors reported
|
||||
@ -37,7 +37,7 @@ do
|
||||
tADDED=$(sed -e 's/^"//' -e 's/"$//' <<<"$ADDED")
|
||||
tDESC=$(sed -e 's/^"//' -e 's/"$//' <<<"$DESC")
|
||||
filename=$tID"_"${tNAME// /_}"_("${tDESC// /_}")_"$tADDED".pdf"
|
||||
if [ -f "$filename" ]; then
|
||||
if [ -f "$downloadFolder/$filename" ]; then
|
||||
echo "-> $tID exists. Skipping..."
|
||||
if [[ $error_level = 2 ]]; then
|
||||
echo "$filename exists." >> $logfile
|
||||
@ -50,8 +50,8 @@ do
|
||||
fi
|
||||
else
|
||||
echo -ne "--> $tID downloading now..."
|
||||
curl $tLINK --silent --output $filename
|
||||
if [ -f "$filename" ]; then
|
||||
curl $tLINK --silent --output "Instructions/$filename"
|
||||
if [ -f "$downloadFolder/$filename" ]; then
|
||||
echo "Done!"
|
||||
else
|
||||
echo "ERROR!"
|
||||
|
Loading…
Reference in New Issue
Block a user