Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retain WARCs when building from source #442

Merged
merged 1 commit into from
Aug 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions bundledApps/MAKEFILE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ if [ -d "$DIRECTORY" ]; then
while true; do
read -p "Do you want me to delete the old app and continue (y/n)? " yn
case $yn in
[Yy]* ) echo "Continuing to build"; break;;
[Yy]* ) echo "Continuing to build, retaining WARCs"; break;;
[Nn]* ) exit;;
* ) echo "Please answer y or n.";;
esac
done
fi

if [ $1 == "ci" ]; then
if [[ $1 == "ci" ]]; then
ans="i"
else
read -p "Would you like to install binary (i), create dmg (d), or both (b)? (i/d/b) " ans
Expand Down Expand Up @@ -76,6 +76,21 @@ deleteBinary ()
rm -rf /Applications/WAIL.app
}

mvWARCsToTemp ()
{
echo "Moving WARCs to /tmp/tempArchives/"
mv /tmp/tempArchives /tmp/tempArchives_old
mv /Applications/WAIL.app/archives /tmp/tempArchives
}

mvWARCsBackFromTemp ()
{
echo "Moving WARCs back to /Applications/WAIL.app/archives/"
mv /tmp/tempArchives/* /Applications/WAIL.app/archives/
rm -rf /tmp/tempArchives
mv /tmp/tempArchives_old /tmp/tempArchives
}

mvProducts ()
{
mv ./dist/WAIL.app /Applications/
Expand Down Expand Up @@ -114,10 +129,12 @@ tweakOS ()

installRequirements
createBinary
mvWARCsToTemp
deleteBinary # Remove previous version
optimizeforMac
mvProducts
cleanupByproducts
mvWARCsBackFromTemp

# install binary, create dmg, or both? (i/d/b)

Expand Down