#!/bin/bash
#########################################################
# 							#
# This is BashStyle-NG 7.9				#
#							#
# Licensed under GNU GENERAL PUBLIC LICENSE v3    	#
#							#
# Copyright 2007 - 2009 Christopher Bratusek		#
#							#
#########################################################

case $1 in

	*)

		echo "Bumping Version from $1 to $2"
		for file in documentation/index.html documentation/chapter00.html documentation/chapter01.html \
			documentation/chapter02.html documentation/chapter03.html documentation/chapter04.html \
			documentation/chapter05.html documentation/chapter06.html documentation/chapter07.html \
			documentation/chapter08.html documentation/chapter09.html documentation/chapter10.html \
			documentation/chapter10.thml configure rc/functions/random rc/functions/bs-ng-echo \
			scripts/bs-ng-profiler rc/functions/countfiles rc/functions/countprocesses \
			rc/functions/showload rc/functions/showmem rc/functions/showsize \
			rc/functions/showtty rc/functions/showuptime rc/functions/truncpwd rc/nx-rc.in \
			rc/themes/bracket-rc rc/themes/dash-rc rc/themes/fallback-rc \
			rc/themes/poweruser-rc rc/themes/clock-ad-rc rc/themes/dirks-rc \
			rc/themes/sepa_ng-rc rc/themes/clock-rc rc/functions/ls \
			rc/themes/dot_prompt-rc rc/themes/job-rc rc/themes/separator-rc \
			rc/themes/custom-rc rc/themes/elite-rc rc/themes/minimal-rc rc/functions/xchown \
			rc/themes/vector-rc rc/misc/alias-rc rc/misc/options-rc rc/functions/xcp \
			rc/misc/shopt-rc rc/misc/color-rc rc/misc/man-rc rc/functions/xunalias \
			rc/misc/random-rc mkrelease data/terminfo/mostlike.terminfo rc/functions/git \
			data/terminfo/bold.terminfo code/bashstyle.in rc/themes/quirk-rc rc/functions/xconv\
			rc/functions/showbatteryload rc/functions/showcpuload rc/functions/showspace \
			rc/misc/readline-rc rc/themes/sputnik-rc rc/misc/vim-rc rc/misc/nano-rc \
			rc/functions/showip rc/functions/man2pdf rc/functions/systeminfos rc/functions/exchange \
			scripts/rcgenerator data/terminfo/nebula.terminfo rc/functions/debug rc/functions/xdel \
			rc/functions/check_opt rc/functions/gconf rc/misc/ls-rc rc/functions/xmv; do
				sed -e "s/NG $1/NG $2/g" -i $file;
		done
		sed -e "s/$1/$2/g" -i data/bashstyle7.ui
		sed -e "s/$1/$2/g" -i debian/changelog
		sed -e "s/VERSION=$1/VERSION=$2/g" -i .configure/base
		_svnver=$(svn info | grep Revision | gawk '{print $2}')
		svnver=$(($_svnver+1))
		sed -e "s/rev.*)/rev$svnver)/g" -i .configure/base

	;;

esac
