Browse Source

Add install and new entry util script

master
Matt Baer 9 years ago
parent
commit
543eb0203c
2 changed files with 33 additions and 0 deletions
  1. +28
    -0
      install.sh
  2. +5
    -0
      util/squiggle.sh

+ 28
- 0
install.sh View File

@@ -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."

+ 5
- 0
util/squiggle.sh View File

@@ -0,0 +1,5 @@
#!/bin/bash

entriesDir=$HOME/~entries/
vi "$entriesDir$(date +'%Y%m%d')" "+set wrap" "+set linebreak"
echo "Done!"

Loading…
Cancel
Save