Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

gccode regex fix

  • Loading branch information...
commit 0c65232d44042ef46da6282c05025082df1a2af6 1 parent b561279
Bernhard Tittelbach authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  emailfilter_scripts/gcmail_download_wp.sh
  2. +1 −1  gc_grab_gpx.py
View
2  emailfilter_scripts/gcmail_download_wp.sh
@@ -13,7 +13,7 @@ trap "rm -Rf $tmpdir" EXIT
uudeview -q +o -t -p "$tmpdir" - || exit 0
decfiles=( "${tmpdir}"/*(.N) )
((#decfiles == 0)) && exit 0
-local GCTXT="$(egrep "For GC.....: .* \(.* Cache\)" "${decfiles[@]}")"
+local GCTXT="$(egrep "For GC[A-Z0-9]+: .* \(.* Cache\)" "${decfiles[@]}")"
if [[ -n $GCTXT && "$GCTXT" != *"(Unknown Cache)"* && "$GCTXT" == *(#b)(GC([A-Z0-9])##):\ * ]]; then
$GCTOOLS_GRAB_SCRIPT -u "$GCUSER" -p "$GCPASS" -d "$GPX_DIR" "$match[1]" &>/dev/null
fi
View
2  gc_grab_gpx.py
@@ -53,7 +53,7 @@ def usage():
elif o in ["-p","--password"]:
gc_password_=a
-re_gccode = re.compile(r'GC[a-z0-9]{5}',re.IGNORECASE)
+re_gccode = re.compile(r'GC[a-z0-9]{1,6}',re.IGNORECASE)
re_pquid = re.compile(r'[a-f0-9-]{36}',re.IGNORECASE)
pquids = filter(re_pquid.match, args)
gccodes = filter(re_gccode.match, args)
Please sign in to comment.
Something went wrong with that request. Please try again.