Path: blob/master/build/pkgs/cddlib/patches/refresh_autogenerated.sh
8818 views
#!/usr/bin/env bash123cat <<EOF45To refresh the autogenerated files you need to install the cddlib6spkg, rerun autotools, and then copy the newly generated files into7the patches/autogenerated directory. This script helps with the last8part, namely copying the relevant autogenerated files.910This script must be run inside the patches/ directory and requires a11single argument, the spkg build directory from where the newly12generated files are copied.1314In short, you need to do the following. First, install the spkg:1516[user@localhost]$ sage -pkg cddlib-<version>17[user@localhost]$ sage -i -s cddlib-<version>.spkg18... does not matter if it actually compiles ...1920Then, rerun the autotools:2122[user@localhost]$ cd $SAGE_LOCAL/spkg/build/cddlib-<version>/src23[user@localhost]$ autoreconf -fiv2425Finally, copy the newly generated files:2627[user@localhost]$ cd cddlib-<version>/patches/28[user@localhost]$ ./refresh_autogenerated.sh $SAGE_LOCAL/spkg/build/cddlib-<version>/src29EOF30echo3132PATCHDIR=`pwd`33BUILDDIR=$1343536echo "Copying autogenerated files from $BUILDDIR to $PATCHDIR"37[ ! -d "$BUILDDIR" ] && echo "Directory does not exist" && exit 138[ ! -d "$PATCHDIR/autogenerated" ] && echo "You are not in the patches/ directory" && exit 13940cd $PATCHDIR/autogenerated41for i in `find . -type f` ; do cp -Rp $BUILDDIR/$i $i ; done4243444546