From 543eb0203c214a0b39e7c73be83aced383cea47d Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Thu, 29 Jan 2015 01:28:13 -0500 Subject: [PATCH] Add install and new entry util script --- install.sh | 28 ++++++++++++++++++++++++++++ util/squiggle.sh | 5 +++++ 2 files changed, 33 insertions(+) create mode 100755 install.sh create mode 100755 util/squiggle.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..6293213 --- /dev/null +++ b/install.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +echo "Installing squigglelog..." + +echo "Linking entries folder to $HOME/~entries" +if [ ! -e $HOME/~entries ]; then + ln -s $PWD/entries/ $HOME/~entries +else + echo "Folder already exists, skipping..." +fi + +echo "Installing utility scripts..." +if [ ! -e $HOME/bin ]; then + EM="\033[1;33m" + NC="\033[0m" + echo "Creating bin/ folder" + mkdir $HOME/bin + echo -e "${EM}You may have to add this to your ~/.bashrc file:" + echo -e "export PATH=${PATH}:$HOME/bin$NC" +fi +cp util/* $HOME/bin/ + +echo "Building squigglelog..." +go build squigglelog.go + +echo "Done!" +echo +echo "To get started, type squiggle.sh and write your first entry." diff --git a/util/squiggle.sh b/util/squiggle.sh new file mode 100755 index 0000000..db030fd --- /dev/null +++ b/util/squiggle.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +entriesDir=$HOME/~entries/ +vi "$entriesDir$(date +'%Y%m%d')" "+set wrap" "+set linebreak" +echo "Done!"