I have now incorporated the 'git archive' functionality into a single process that makes use of 'create_empty' function and other features.
function git-archive () { PREFIX="${1}"; ## sudo mkdir -p ${PREFIX} REPO_PATH="`echo "${2}"|awk -F: '{print $1}'`"; RELEASE="`echo "${2}"|awk -F: '{print $2}'`"; USER_PATH="${PWD}"; echo "$PREFIX $REPO_PATH $RELEASE $USER_PATH"; ## Dynamically added '.empty' files to the Git-Structure: cd "${REPO_PATH}"; populate_empty .; echo -en "\n"; # git archive --prefix=git-1.4.0/ -o git-1.4.0.tar.gz v1.4.0 # e.g.: git-archive /var/www/htdocs /repos/flyerland.ca/flyerland/rel-1.0.0 git archive --verbose --prefix=${PREFIX}/ -o ${USER_PATH}/${RELEASE}.tar.gz ${RELEASE} cd "${USER_PATH}"; ## Purging SRC/TRG_DIRs variable(s): unset PREFIX RELEASE; return 0; }