add installer script
This commit is contained in:
parent
fd5c988f5c
commit
cb6867d329
|
@ -30,5 +30,6 @@ bin/*
|
|||
|
||||
www/public/
|
||||
www/data/
|
||||
www/static/install.sh
|
||||
|
||||
docs/demo.gif
|
||||
|
|
7
Makefile
7
Makefile
|
@ -48,12 +48,11 @@ release-darwin: bin/pomo-$(VERSION)-darwin-amd64 bin/pomo-$(VERSION)-darwin-amd6
|
|||
|
||||
release: release-linux release-darwin
|
||||
|
||||
docs: readme
|
||||
cd www && hugo -d ../docs
|
||||
|
||||
readme: www/data/readme.json
|
||||
docs: www/data/readme.json
|
||||
cd www && cp ../install.sh static/ && hugo -d ../docs
|
||||
|
||||
www/data/readme.json: www/data README.md
|
||||
cat README.md | python -c 'import json,sys; print(json.dumps({"content": sys.stdin.read()}))' > $@
|
||||
|
||||
www/data bin:
|
||||
mkdir -p $@
|
||||
|
|
35
README.md
35
README.md
|
@ -20,32 +20,18 @@ The Pomodoro Technique is simple and effective:
|
|||
|
||||
Binaries are available for Linux and OSX platforms in the [releases section](https://github.com/kevinschoon/pomo/releases) on github.
|
||||
|
||||
#### Linux
|
||||
### Installer Script
|
||||
|
||||
```
|
||||
curl -L -o pomo https://github.com/kevinschoon/pomo/releases/download/0.6.0/pomo-0.6.0-linux-amd64
|
||||
# Optionally verify file integrity
|
||||
echo 97be4ccf66c4ae4e3e154f87b9bb0bf2 pomo | md5sum -c -
|
||||
chmod +x pomo
|
||||
./pomo -v
|
||||
# Copy pomo to somewhere on your $PATH
|
||||
```
|
||||
|
||||
#### OSX
|
||||
|
||||
```
|
||||
curl -L -o pomo https://github.com/kevinschoon/pomo/releases/download/0.6.0/pomo-0.6.0-darwin-amd64
|
||||
# Optionally verify file integrity
|
||||
[[ $(md5 -r pomo) != "55d77a30dfd6f66c95e19dd83c7ec95c pomo" ]] && echo "invalid hash!"
|
||||
chmod +x pomo
|
||||
./pomo -v
|
||||
# Copy pomo to somewhere on your $PATH
|
||||
A bash script to download and verify the latest release for Linux and OSX platforms can be run
|
||||
with the following command:
|
||||
|
||||
```bash
|
||||
curl -L -s https://kevinschoon.github.io/pomo/install.sh | bash /dev/stdin
|
||||
```
|
||||
|
||||
### Source
|
||||
|
||||
```
|
||||
```bash
|
||||
go get github.com/kevinschoon/pomo
|
||||
pomo -v
|
||||
```
|
||||
|
@ -54,12 +40,12 @@ chmod +x pomo
|
|||
|
||||
Once `pomo` is installed you need to initialize it's database.
|
||||
|
||||
```
|
||||
``` bash
|
||||
pomo init
|
||||
```
|
||||
|
||||
Start a 4 pomodoro session at 25 minute intervals:
|
||||
```
|
||||
```bash
|
||||
pomo start -t my-project "write some codes"
|
||||
```
|
||||
|
||||
|
@ -72,7 +58,7 @@ Pomo has a few configuration options which can be read from a JSON file in Pomo'
|
|||
You can map colors to specific tags in the `colors` field.
|
||||
|
||||
Example:
|
||||
```
|
||||
```json
|
||||
{
|
||||
"colors": {
|
||||
"my-project": "hiyellow",
|
||||
|
@ -93,7 +79,7 @@ making it easy to script and embed it's output in various Linux status bars.
|
|||
You can create a module with the `custom/script` type and
|
||||
embed Pomo's status output in your Polybar:
|
||||
|
||||
```
|
||||
```ini
|
||||
[module/pomo]
|
||||
type = custom/script
|
||||
interval = 1
|
||||
|
@ -104,7 +90,6 @@ exec = pomo status
|
|||
## Roadmap
|
||||
|
||||
* Generate charts/burn down
|
||||
* System tray notification/icon
|
||||
* ??
|
||||
|
||||
## Credits
|
||||
|
|
|
@ -146,30 +146,17 @@
|
|||
|
||||
<p>Binaries are available for Linux and OSX platforms in the <a href="https://github.com/kevinschoon/pomo/releases">releases section</a> on github.</p>
|
||||
|
||||
<h4 id="linux">Linux</h4>
|
||||
<h3 id="installer-script">Installer Script</h3>
|
||||
|
||||
<pre><code>curl -L -o pomo https://github.com/kevinschoon/pomo/releases/download/0.6.0/pomo-0.6.0-linux-amd64
|
||||
# Optionally verify file integrity
|
||||
echo 97be4ccf66c4ae4e3e154f87b9bb0bf2 pomo | md5sum -c -
|
||||
chmod +x pomo
|
||||
./pomo -v
|
||||
# Copy pomo to somewhere on your $PATH
|
||||
</code></pre>
|
||||
|
||||
<h4 id="osx">OSX</h4>
|
||||
|
||||
<pre><code>curl -L -o pomo https://github.com/kevinschoon/pomo/releases/download/0.6.0/pomo-0.6.0-darwin-amd64
|
||||
# Optionally verify file integrity
|
||||
[[ $(md5 -r pomo) != "55d77a30dfd6f66c95e19dd83c7ec95c pomo" ]] && echo "invalid hash!"
|
||||
chmod +x pomo
|
||||
./pomo -v
|
||||
# Copy pomo to somewhere on your $PATH
|
||||
<p>A bash script to download and verify the latest release for Linux and OSX platforms can be run
|
||||
with the following command:</p>
|
||||
|
||||
<pre><code class="language-bash">curl -L -s https://kevinschoon.github.io/pomo/install.sh | bash /dev/stdin
|
||||
</code></pre>
|
||||
|
||||
<h3 id="source">Source</h3>
|
||||
|
||||
<pre><code> go get github.com/kevinschoon/pomo
|
||||
<pre><code class="language-bash"> go get github.com/kevinschoon/pomo
|
||||
pomo -v
|
||||
</code></pre>
|
||||
|
||||
|
@ -177,12 +164,12 @@ chmod +x pomo
|
|||
|
||||
<p>Once <code>pomo</code> is installed you need to initialize it’s database.</p>
|
||||
|
||||
<pre><code>pomo init
|
||||
<pre><code class="language-bash">pomo init
|
||||
</code></pre>
|
||||
|
||||
<p>Start a 4 pomodoro session at 25 minute intervals:</p>
|
||||
|
||||
<pre><code>pomo start -t my-project "write some codes"
|
||||
<pre><code class="language-bash">pomo start -t my-project "write some codes"
|
||||
</code></pre>
|
||||
|
||||
<h2 id="configuration">Configuration</h2>
|
||||
|
@ -195,7 +182,7 @@ chmod +x pomo
|
|||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code>{
|
||||
<pre><code class="language-json">{
|
||||
"colors": {
|
||||
"my-project": "hiyellow",
|
||||
"another-project": "green"
|
||||
|
@ -215,7 +202,7 @@ making it easy to script and embed it’s output in various Linux status bar
|
|||
<p>You can create a module with the <code>custom/script</code> type and
|
||||
embed Pomo’s status output in your Polybar:</p>
|
||||
|
||||
<pre><code>[module/pomo]
|
||||
<pre><code class="language-ini">[module/pomo]
|
||||
type = custom/script
|
||||
interval = 1
|
||||
exec = pomo status
|
||||
|
@ -225,7 +212,6 @@ exec = pomo status
|
|||
|
||||
<ul>
|
||||
<li>Generate charts/burn down</li>
|
||||
<li>System tray notification/icon</li>
|
||||
<li>??</li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
POMO_VERSION="0.7.0"
|
||||
OSX_MD5="4aa452e021d07bbb2c7c3a15839fe5df"
|
||||
LINUX_MD5="84551ab258902e62d9d8e14368bfdf4b"
|
||||
OSX_TARBALL="https://github.com/kevinschoon/pomo/releases/download/$POMO_VERSION/pomo-$POMO_VERSION-darwin-amd64"
|
||||
LINUX_TARBALL="https://github.com/kevinschoon/pomo/releases/download/$POMO_VERSION/pomo-$POMO_VERSION-linux-amd64"
|
||||
|
||||
install_pomo() {
|
||||
echo "Installing Pomo..."
|
||||
if [[ "$OSTYPE" == darwin* ]] ; then {
|
||||
curl -L -o pomo "$OSX_TARBALL" && \
|
||||
[[ $(md5 -r pomo) == "$OSX_MD5" ]] && \
|
||||
chmod +x pomo && \
|
||||
./pomo -v
|
||||
} elif [[ "$OSTYPE" == linux* ]] ; then {
|
||||
curl -L -o pomo "$LINUX_TARBALL" && \
|
||||
echo "$LINUX_MD5 pomo" | md5sum -c - && \
|
||||
chmod +x pomo && \
|
||||
./pomo -v
|
||||
} else {
|
||||
echo "cannot detect OS type"
|
||||
return 1
|
||||
}
|
||||
fi
|
||||
echo "Pomo $POMO_VERSION installed, copy ./pomo to somewhere on your path."
|
||||
}
|
||||
|
||||
install_pomo
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
POMO_VERSION="0.7.0"
|
||||
OSX_MD5="4aa452e021d07bbb2c7c3a15839fe5df"
|
||||
LINUX_MD5="84551ab258902e62d9d8e14368bfdf4b"
|
||||
OSX_TARBALL="https://github.com/kevinschoon/pomo/releases/download/$POMO_VERSION/pomo-$POMO_VERSION-darwin-amd64"
|
||||
LINUX_TARBALL="https://github.com/kevinschoon/pomo/releases/download/$POMO_VERSION/pomo-$POMO_VERSION-linux-amd64"
|
||||
|
||||
install_pomo() {
|
||||
echo "Installing Pomo..."
|
||||
if [[ "$OSTYPE" == darwin* ]] ; then {
|
||||
curl -L -o pomo "$OSX_TARBALL" && \
|
||||
[[ $(md5 -r pomo) == "$OSX_MD5" ]] && \
|
||||
chmod +x pomo && \
|
||||
./pomo -v
|
||||
} elif [[ "$OSTYPE" == linux* ]] ; then {
|
||||
curl -L -o pomo "$LINUX_TARBALL" && \
|
||||
echo "$LINUX_MD5 pomo" | md5sum -c - && \
|
||||
chmod +x pomo && \
|
||||
./pomo -v
|
||||
} else {
|
||||
echo "cannot detect OS type"
|
||||
return 1
|
||||
}
|
||||
fi
|
||||
echo "Pomo $POMO_VERSION installed, copy ./pomo to somewhere on your path."
|
||||
}
|
||||
|
||||
install_pomo
|
Loading…
Reference in New Issue