From 1fda9b2234aebba9a94bfeca879dae1ed95593fd Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Wed, 1 Nov 2017 13:40:02 -0500 Subject: [PATCH] Download fix --- Makefile | 2 +- wolfpack | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b078abe..958c262 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/wolfpack b/wolfpack index fd0bcd8..ec51d59 100755 --- a/wolfpack +++ b/wolfpack @@ -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