Skip to content

Instantly share code, notes, and snippets.

@guanix
Created March 15, 2011 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guanix/870186 to your computer and use it in GitHub Desktop.
Save guanix/870186 to your computer and use it in GitHub Desktop.
#!/bin/sh
# FACTCHECK: Double-check you got your stuff right.
# This is the filename of the new hotlist for users you need to re-download.
# Run it in the script directory, it'll go down and smash the furniture properly.
echo "" > missing-hotlist.txt
cd videos
for each in *
do
if [ -d $each ]
then
cd $each
echo "[.] $each...."
for html in `find . -type f -name \*\-\*.html`
do
number=`echo $html | sed 's/.*-//g' | sed 's/\.html//g'`
if [ "$number" -gt 1000 ]
then
if [ -z "`ls -a *-$number.flv 2>/dev/null`" ] && [ ! -e $number.notitle ]
then
UTFSUCKSBALLS=1
fi
fi
done
if [ "$UTFSUCKSBALLS" = "1" ]
then
echo "$each" >> ../../missing-hotlist.txt
echo " $each needs a redo."
UTFSUCKSBALLS=
fi
fi
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment