Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonrclark committed May 24, 2017
0 parents commit 393efce
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.zip
*.tar.gz
.DS_Store
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Shoes 4 Mac App Templates

Source repo for Shoes 4 Mac apps. Non-binary stuff is kept here. Things like
the JDK downloads are only kept around as releases to keep the size down.

## App Template Updates

The general process for revising a package is:

* Make updats as necessary in `mac-app-template`
* Run `./build.rb 0.0.1` with your desired version number
* Upload resulting zipfile to a new release
* Upload a compatible `jdk.zip` alongside (can reuse from prior releases if
not updating)

## JDK Updates

Document soon!!!
11 changes: 11 additions & 0 deletions build.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/env ruby

require 'fileutils'

version = ARGV[0]
raise "Must include a version as argument" unless version

root = File.expand_path(File.join(__FILE__, ".."))

`find . -name ".DS_Store" -exec rm {} \\;`
`zip -r linux-app-template-#{version}.zip linux-app-template`
26 changes: 26 additions & 0 deletions linux-app-template/app
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#! /usr/bin/env bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
COMMAND=java

# See if Java's there to just use
$COMMAND -version &> /dev/null
if [ $? != 0 ]; then

# See if we already have a downloaded JRE we can use
if [ ! -d ~/.shoes/jre ]; then
mkdir -p ~/.shoes

# Download a JRE
pushd ~/.shoes
curl -L https://github.com/shoes/linux-app-templates/releases/download/jre1.8.0_131/jre1.8.0_131.tar.gz > jre.tar.gz
tar -zxvf jre.tar.gz
mv ~/.shoes/jre1.8.0_131.jre ~/.shoes/jre
popd
fi

export JAVA_HOME=~/.shoes/jre/Contents/Home/
COMMAND=$JAVA_HOME/bin/java
fi

$COMMAND -jar $DIR/app.jar

0 comments on commit 393efce

Please sign in to comment.