Skip to content

Commit

Permalink
Added functionality to track mangas and report errors in case manga d…
Browse files Browse the repository at this point in the history
…oesnt exist . Also added the ignore file
  • Loading branch information
shrayasr committed Mar 25, 2012
1 parent 73770cd commit 6c94ab5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mangas
28 changes: 24 additions & 4 deletions MUL.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

tflag=off
lflag=off
dflag=off
tflag=
lflag=
dflag=

while [ $# -gt 0 ]
do
Expand All @@ -12,6 +12,7 @@ do
lastChapter=$3
shift
shift
shift
break;;
-l) lflag=on;;
-d) dflag=on
Expand All @@ -21,4 +22,23 @@ do
esac

shift
done
done

if [ tflag ]
then
code=`curl -s -L -w %{http_code} -o /dev/null www.mangareader.net/$manga`

if [ $code == "404" ]
then
echo "Manga : \"$manga\" not found. Are u sure it exists in the mangareader database?"
exit 1
fi

if ! [ -f mangas ]
then
touch mangas
fi

echo $manga >> mangas

fi

0 comments on commit 6c94ab5

Please sign in to comment.