#!/bin/sh

echo "UnTAR\n"
tar xvfz terraloc-linux-*.tar.gz
echo "Touch\n"
find * -exec touch {} +
echo "Fix permissions\n"
chmod -R a+rx *
echo "Make New Release Archive\n"
tar cvfz terraloc-release.tar.gz --exclude='*.tar.gz' --exclude='tpro2release.sh'  *
echo "Cleanup\n"
rm -r home/
rm -r usr/
echo "\n\n"
echo "############################\n"
echo "#   Install Instructions   #\n"
echo "############################\n"
echo "cd /\n"
echo "sudo tar xvfz /home/terraloc/release/terraloc-release.tar.gz\n"
echo "  User: terraloc   Password: abem1923\n"
echo "sudo ldconfig\n"
echo "nano /home/terraloc/.SeisTW\n"
echo "REBOOT AND DONE!\n"

