#!/bin/bash
set -e
rm -rf distribution_tarball
tmp_dir_create_command="mkdir -p distribution_tarball"
target_dir=`$tmp_dir_create_command`
target_version=$1
target_dir="$target_dir/libvarnam-$target_version"
mkdir $target_dir
cp -r . $target_dir
cd $target_dir
git clean -f -x -d
./varnamc --compile schemes/ml
./varnamc --compile schemes/ml-inscript
./varnamc --compile schemes/hi
rm -rf .git
cd ..
tar -pczf "libvarnam-$target_version.tar.gz" "libvarnam-$target_version"
#gpg -b --use-agent "libvarnam-$target_version.tar.gz"
#gpg --verify "libvarnam-$target_version.tar.gz.sig"
chmod 644 *
echo "Created tarball: `pwd`/libvarnam-$target_version.tar.gz"


#!/bin/bash
set -e
tmp_dir_create_command="mktemp -d"
unamestr=`uname`
if [[ "$unamestr" == 'Darwin' ]]; then
	tmp_dir_create_command="mktemp -d -t libvarnam"
fi

target_dir=`$tmp_dir_create_command`
target_version=$1
target_dir="$target_dir/libvarnam-$target_version"
mkdir $target_dir
cp -r . $target_dir
cd $target_dir
git clean -f -x -d
./varnamc --compile schemes/ml
./varnamc --compile schemes/ml-inscript
./varnamc --compile schemes/hi
rm -rf .git
cd ..
tar -pczf "libvarnam-$target_version.tar.gz" "libvarnam-$target_version"
#gpg -b --use-agent "libvarnam-$target_version.tar.gz"
#gpg --verify "libvarnam-$target_version.tar.gz.sig"
chmod 644 *
echo "Created tarball: `pwd`/libvarnam-$target_version.tar.gz"


Revert "[packaging] make distro will create a directory in the current wd"
Revert "[packaging] make distro will create a directory in the current wd"

This reverts commit 66addde5bc0173e59e489a21df0dfda18657e432.
