Skip to content

Commit 1c512b4

Browse files
committed
Initial commit
0 parents  commit 1c512b4

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.zip
2+
*.tar.gz
3+
.DS_Store

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Shoes 4 Linux App Templates
2+
3+
Source repo for Shoes 4 Linux apps. Non-binary stuff is kept here. Things like
4+
the JDK downloads are only kept around as releases to keep the size down.
5+
6+
## App Template Updates
7+
8+
The general process for revising a package is:
9+
10+
* Make updates as necessary in `linux-app-template`
11+
* Run `./build.rb 0.0.1` with your desired version number
12+
* Upload resulting zipfile to a new release
13+
* Upload a compatible JRE alongside (can reuse from prior releases if not
14+
updating)
15+
16+
## JDK Updates
17+
18+
Document soon!!!

build.rb

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#! /usr/bin/env ruby
2+
3+
require 'fileutils'
4+
5+
version = ARGV[0]
6+
raise "Must include a version as argument" unless version
7+
8+
root = File.expand_path(File.join(__FILE__, ".."))
9+
10+
`find . -name ".DS_Store" -exec rm {} \\;`
11+
`zip -r linux-app-template-#{version}.zip linux-app-template`

linux-app-template/app

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#! /usr/bin/env bash
2+
3+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4+
COMMAND=java
5+
6+
# See if Java's there to just use
7+
$COMMAND -version &> /dev/null
8+
if [ $? != 0 ]; then
9+
10+
# See if we already have a downloaded JRE we can use
11+
if [ ! -d ~/.shoes/jre ]; then
12+
mkdir -p ~/.shoes
13+
14+
# Download a JRE
15+
pushd ~/.shoes
16+
curl -L https://github.com/shoes/linux-app-templates/releases/download/jre1.8.0_131/jre1.8.0_131.tar.gz > jre.tar.gz
17+
tar -zxvf jre.tar.gz
18+
mv ~/.shoes/jre1.8.0_131 ~/.shoes/jre
19+
popd
20+
fi
21+
22+
export JAVA_HOME=~/.shoes/jre
23+
COMMAND=$JAVA_HOME/bin/java
24+
fi
25+
26+
$COMMAND -jar $DIR/app.jar

0 commit comments

Comments
 (0)