From 14a16087070e40da04b0120acd306088b3820d4c Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Tue, 14 Jan 2014 19:08:53 +0200 Subject: [PATCH] bashrc & zshrc: fix alias inxi-install & add alias inxi-install-root 1. Previously the Alias failed if the directory ~/.local/bin didn't exist. 2. Add Alias inxi-install-root for global installation as root. --- bashrc | 4 +++- zshrc | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 3c90ed91..e606c812 100644 --- a/bashrc +++ b/bashrc @@ -449,9 +449,11 @@ alias fcorepattern='echo kernel.core_pattern = %e-%p-%h.core >> /etc/sysctl.conf alias ffmpeg=avconv # inxi https://code.google.com/p/inxi/ -alias inxi-install="cd ~/.local/bin && \wget -Nc smxi.org/inxi && chmod +x inxi && cd" +alias inxi-install="mkdir -p ~/.local/bin && cd ~/.local/bin && \wget -Nc smxi.org/inxi && chmod +x inxi && cd" +alias inxi-install-root="cd /usr/local/bin && \wget -Nc smxi.org/inxi && chmod +x inxi && cd" alias inxi-update="inxi -U" + # Allow custom aliases to be put in .aliases or .bash_aliases . # .aliases diff --git a/zshrc b/zshrc index c067df51..f02efec7 100644 --- a/zshrc +++ b/zshrc @@ -422,7 +422,8 @@ alias fcorepattern='echo kernel.core_pattern = %e-%p-%h.core >> /etc/sysctl.conf alias ffmpeg=avconv # inxi https://code.google.com/p/inxi/ -alias inxi-install="cd ~/.local/bin && \wget -Nc smxi.org/inxi && chmod +x inxi && cd" +alias inxi-install="mkdir -p ~/.local/bin && cd ~/.local/bin && \wget -Nc smxi.org/inxi && chmod +x inxi && cd" +alias inxi-install-root="cd /usr/local/bin && \wget -Nc smxi.org/inxi && chmod +x inxi && cd" alias inxi-update="inxi -U"