From 12ad8711e8b7d39e139edb3a677d9b94cdfc1e8e Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Wed, 4 Apr 2007 06:43:48 +0000 Subject: [PATCH] Fix formerly untested make-c-files script for making distribution tarballs. --- v7/dist/make-c-files | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/v7/dist/make-c-files b/v7/dist/make-c-files index 6751db37f..a6d79c69f 100644 --- a/v7/dist/make-c-files +++ b/v7/dist/make-c-files @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: make-c-files,v 1.1 2007/04/04 05:08:18 riastradh Exp $ +# $Id: make-c-files,v 1.2 2007/04/04 06:43:48 riastradh Exp $ # # Copyright 2007 Massachusetts Institute of Technology # @@ -57,7 +57,7 @@ TL_DIR="$(pwd)" C_DIR_REL="$(get_release_prefix "${VERSION}")" C_DIR="${TL_DIR}/${C_DIR_REL}" -SRC_FILE="${SRC_FILE}.tar.gz" +SRC_FILE="${C_DIR}.tar.gz" STAMP_C="${TL_DIR}/stamp-c" if [ ! -f "${SRC_FILE}" ]; then @@ -65,7 +65,7 @@ if [ ! -f "${SRC_FILE}" ]; then exit 1 fi -if [ ! -f "${STAMP_BUILD}" ]; then +if [ ! -f "${STAMP_C}" ]; then rm -rf "${C_DIR}" tar xzf "${SRC_FILE}" @@ -74,6 +74,8 @@ if [ ! -f "${STAMP_BUILD}" ]; then ./configure --enable-native-code=c make c make c-clean + + touch "${STAMP_C}" fi tarfile="${C_DIR}-c.tar.gz" @@ -82,13 +84,14 @@ zipfile="${C_DIR}-c.zip" rm -f "${tarfile}" rm -f "${zipfile}" -tar cvzf "${tarfile}" "${C_DIR}" +tar cvzf "${tarfile}" "${C_DIR_REL}" +rm -rf "${C_DIR}/src/lib" for S in $(find ${C_DIR} -type l); do [ ! -r "${S}" ] && rm -f "${S}" done -zip -rl "${zipfile}" "${C_DIR}" +zip -rl "${zipfile}" "${C_DIR_REL}" chmod -w "${zipfile}" rm -rf "${C_DIR}" -- 2.25.1