1#!/usr/bin/env sh 2 3out_putdir=$3 4 5if [ ! -d $out_putdir ] 6then 7 mkdir -p $out_putdir 8fi 9 10cp $1 $out_putdir/VERSION 11cp $2 $out_putdir/version.sh 12 13cd $out_putdir 14 15version=$(sh version.sh) 16 17printf '#define VERSION "%s"\n' $version > version.h 18 19rm VERSION version.sh 20