Check if todo.sh already installed, correct path to it

This commit is contained in:
zen
2018-05-02 15:46:55 +09:30
parent 960ff4dc2e
commit ae10ee6cdc
2 changed files with 11 additions and 9 deletions

5
.zshrc
View File

@@ -118,10 +118,7 @@ export MARKER_KEY_NEXT_PLACEHOLDER="\C-b" #change maker key binding from Ctr+t
[[ -s "$HOME/.local/share/marker/marker.sh" ]] && source "$HOME/.local/share/marker/marker.sh"
export PATH=$PATH:~/.todo/bin
#alias todo.sh="~/.quickzsh/todo/todo.sh"
#complete -F _todo todo.sh #enable autocompletion for the alias, only needed if different alias
export PATH=$PATH:~/.quickzsh/todo/bin #usig alias doesn't properly work
SAVEHIST=50000 #save upto 50,000 lines in history. oh-my-zsh default is 10,000

View File

@@ -93,11 +93,16 @@ fi
# mkdir ~/.quickzsh/todo/bin ; cp -f ~/.quickzsh/todo/todo.sh ~/.quickzsh/todo/bin/todo.sh # cp todo.sh to ./bin so only it is included in $PATH
# #touch ~/.todo/config # needs it, otherwise spits error , yeah a bug in todo
# ln -s ~/.quickzsh/todo ~/.todo
mkdir -p ~/.quickzsh/todo/bin
wget "https://github.com/todotxt/todo.txt-cli/releases/download/v2.11.0/todo.txt_cli-2.11.0.tar.gz" -P ~/.quickzsh/
tar xvf ~/.quickzsh/todo.txt_cli-2.11.0.tar.gz -C ~/.quickzsh/todo --strip 1 && rm ~/.quickzsh/todo.txt_cli-2.11.0.tar.gz
ln -s ~/.quickzsh/todo/todo.sh ~/.quickzsh/todo/bin/todo.sh # so only .../bin is included in $PATH
ln -s ~/.quickzsh/todo/todo.cfg ~/.todo.cfg # it expects it there or ~/todo.cfg or ~/.todo/config
if [ ! -L ~/.quickzsh/todo/bin/todo.sh ]; then
echo -e "Installing todo.sh in ~/.quickzsh/todo\n"
mkdir -p ~/.quickzsh/todo/bin
wget "https://github.com/todotxt/todo.txt-cli/releases/download/v2.11.0/todo.txt_cli-2.11.0.tar.gz" -P ~/.quickzsh/
tar xvf ~/.quickzsh/todo.txt_cli-2.11.0.tar.gz -C ~/.quickzsh/todo --strip 1 && rm ~/.quickzsh/todo.txt_cli-2.11.0.tar.gz
ln -s ~/.quickzsh/todo/todo.sh ~/.quickzsh/todo/bin/todo.sh # so only .../bin is included in $PATH
ln -s ~/.quickzsh/todo/todo.cfg ~/.todo.cfg # it expects it there or ~/todo.cfg or ~/.todo/config
else
echo -e "todo.sh is already instlled in ~/.quickzsh/todo\n"
fi
if [[ $1 == "--cp-hist" ]]; then
echo -e "\nCopying bash_history to zsh_history\n"