lib/ss/std_rqs.c debugfs/debug_cmds.c debugfs/ro_debug_cmds.c \
debugfs/extent_cmds.c debugfs/e2freefrag.c debugfs/create_inode.c \
debugfs/recovery.c debugfs/revoke.c \
- MODULE_LICENSE_GPL"
+ MODULE_LICENSE_GPL README.version"
SS_DIR=$(pwd)/lib/ss
MK_CMDS=/tmp/mk_cmds$$.sh
touch MODULE_LICENSE_GPL
+E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION version.h \
+ | awk '{print $3}' | tr \" " " | awk '{print $1}'`
+DATE=`grep E2FSPROGS_DATE version.h | awk '{print $3}' \
+ | tr \" " "`
+E2FSPROGS_DAY=$(echo $DATE | awk -F- '{print $1}' | sed -e '/^[1-9]$/s/^/0/')
+MONTH=`echo $DATE | awk -F- '{print $2}'`
+YEAR=`echo $DATE | awk -F- '{print $3}'`
+
+if expr $YEAR ">" 1900 > /dev/null ; then
+ E2FSPROGS_YEAR=$YEAR
+elif expr $YEAR ">" 90 >/dev/null ; then
+ E2FSPROGS_YEAR=19$YEAR
+else
+ E2FSPROGS_YEAR=20$YEAR
+fi
+
+case $MONTH in
+Jan) MONTH_NUM=01; E2FSPROGS_MONTH="January" ;;
+Feb) MONTH_NUM=02; E2FSPROGS_MONTH="February" ;;
+Mar) MONTH_NUM=03; E2FSPROGS_MONTH="March" ;;
+Apr) MONTH_NUM=04; E2FSPROGS_MONTH="April" ;;
+May) MONTH_NUM=05; E2FSPROGS_MONTH="May" ;;
+Jun) MONTH_NUM=06; E2FSPROGS_MONTH="June" ;;
+Jul) MONTH_NUM=07; E2FSPROGS_MONTH="July" ;;
+Aug) MONTH_NUM=08; E2FSPROGS_MONTH="August" ;;
+Sep) MONTH_NUM=09; E2FSPROGS_MONTH="September" ;;
+Oct) MONTH_NUM=10; E2FSPROGS_MONTH="October" ;;
+Nov) MONTH_NUM=11; E2FSPROGS_MONTH="November" ;;
+Dec) MONTH_NUM=12; E2FSPROGS_MONTH="December" ;;
+*) MONTH_NUM=13; E2FSPROGS_MONTH="UNKNOWN" ;;
+esac
+
+base_ver=`echo $E2FSPROGS_VERSION | \
+ sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'`
+
+date_spec=${E2FSPROGS_YEAR}${MONTH_NUM}${E2FSPROGS_DAY}
+
+case $E2FSPROGS_VERSION in
+*-WIP|pre-*)
+ VER="$base_ver-WIP-$date_spec"
+ FN="$base_ver~WIP.$E2FSPROGS_YEAR.$MONTH_NUM.$E2FSPROGS_DAY"
+ ;;
+*)
+ VER="$base_ver"
+ FN="$base_ver"
+ ;;
+esac
+
+sed -e "s/@VER@/$VER/g" -e "s/@FN@/$FN/" < util/android-README.version.in > README.version
+
git add -f $ANDROID_GENERATED_FILES
if test -f COPYING
then