Download fix

This commit is contained in:
DarkFeather 2017-11-01 13:40:02 -05:00
parent ff7aa509fa
commit 1fda9b2234
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ compile: ./tpb.torrentengine.sample
if [ ! -d /usr/local/src/SharedLibraries ]; then git -C /usr/local/src/ clone https://aninix.net/foundation/SharedLibraries; fi
git -C /usr/local/src/SharedLibraries pull;
if [ ! -d /usr/local/etc/WolfPack ]; then mkdir -p /usr/local/etc/WolfPack; chmod 0770 /usr/local/etc/WolfPack; cp ./*.pup /usr/local/etc/WolfPack; cp ./tpb.torrentengine.sample /usr/local/etc/WolfPack; chmod 0660 /usr/local/etc/WolfPack/*; echo "Default configuration directory of /usr/local/etc/WolfPack created with example pups and torrent engine."; fi
${INSTALLER} deluge mlocate
if [ ! -x /usr/sbin/deluged ] || [ ! -x /usr/sbin/locate ]; then ${INSTALLER} deluge mlocate; fi
install: compile /usr/bin/wget /usr/bin/deluge-console /usr/bin/googler ./wolfpack /usr/local/bin/whatismyip /usr/bin/lynx
cp -p /usr/local/src/WolfPack/wolfpack /usr/local/bin/wolfpack

View File

@ -168,7 +168,7 @@ function download {
if [ ! -f "$filename" ]; then
echo Downloading $nexturl to $filename ... | tee -a "$logfile"
export dedupterm="$(echo $1 | rev | cut -f 1 -d '/' | rev | cut -f 1 -d '.')"
for i in $(find -type f "$downloaddir" | grep -i "$dedupterm"); do
for i in $(find "$downloaddir" -type f | grep -i "$dedupterm"); do
echo Deduped! Removed $i from $downloaddir | tee -a "$logfile"
rm -f "$downloaddir"/"$i" 2>&1 | tee -a "$logfile"
done