5 git branch |
grep '^\*' |
grep -q '^\* master$' && return 0 ||
return 1
19 if [ "$method" = "count" ] ; then
20 [ "$limit" -ge "$current" ] && return 0 ||
return 1
23 if [ "$method" = "date" ] ; then
24 [ "$limit" != "$current" ] && return 0 ||
return 1
30 echo "0000000000$1" |
sed 's#.*\(..........\)$#\1#g'
35 git log
--pretty=oneline
--max-count=1 |
sed 's#^.*\([0-9]...-..-..\)$#\1#'
40 [ "$1" = "count" ] && echo "$(pad_to_10_chars $(expr $2 + 1 ))" && return 0
41 [ "$1" = "date" ] && echo "$(get_current_date)" && return 0
44 if is_master_branch
; then
45 emsg
"Refusing to alter the master branch as you might loose the repo"
46 emsg
"please create a waste branch with 'git checkout -b wastebranchformaps' and try again"
50 [ "$#" -lt 2 ] && emsg
"no limitation method was specified" && exit 1
52 if [ "$1" = "-c" ] ; then
53 [ "$#" -eq 1 ] && emsg
"Parameter missing for -c option" && exit 2
56 CURRENT
="$(pad_to_10_chars 1)"
57 elif [ "$1" = "-d" ] ; then
58 [ "$#" -eq 1 ] && emsg
"Parameter missing for -d option" && exit 2
61 CURRENT
="$(get_current_date)"
66 while limit_not_reached
$METHOD $LIMIT $CURRENT ; do
68 git
reset --hard HEAD^
69 osm2pgsql
-b 24.2,43.9,24.5,44.3 -d gis
-m -U osm planet-rom.osm
70 CURRENT
="$(update_current "$METHOD" "$CURRENT")"