mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-13 01:03:57 +00:00
DRY, codestyle, z installation, misc
This commit is contained in:
@@ -29,6 +29,3 @@ switch_case_indent = true # --case-indent
|
|||||||
space_redirects = false
|
space_redirects = false
|
||||||
keep_padding = false
|
keep_padding = false
|
||||||
function_next_line = true # --func-next-line
|
function_next_line = true # --func-next-line
|
||||||
|
|
||||||
[local/bin/antigen.zsh]
|
|
||||||
ignore = true
|
|
||||||
|
|||||||
51
base/zshrc
51
base/zshrc
@@ -10,13 +10,13 @@ export DOTFILES="$HOME/.dotfiles"
|
|||||||
# Run x-load-configs in your terminal to reload the files.
|
# Run x-load-configs in your terminal to reload the files.
|
||||||
function x-load-configs()
|
function x-load-configs()
|
||||||
{
|
{
|
||||||
# Load the shell dotfiles, and then some:
|
# Load the shell dotfiles, and then some:
|
||||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||||
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
[ -f "$file" ] && source "$file"
|
||||||
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
|
[ -f "$file-secret" ] && source "$file-secret"
|
||||||
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
[ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||||
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
[ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
x-load-configs
|
x-load-configs
|
||||||
|
|
||||||
@@ -24,42 +24,17 @@ x-load-configs
|
|||||||
ssh-add -A 2>/dev/null;
|
ssh-add -A 2>/dev/null;
|
||||||
|
|
||||||
# Try to load antigen, if present
|
# Try to load antigen, if present
|
||||||
[[ -f "$XDG_BIN_HOME/antigen.zsh" ]] && source "$XDG_BIN_HOME/antigen.zsh"
|
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
|
||||||
|
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
|
||||||
|
|
||||||
# antigen is present
|
# antigen is present
|
||||||
if command -v antigen &> /dev/null; then
|
if command -v antigen &> /dev/null; then
|
||||||
antigen use oh-my-zsh
|
antigen use oh-my-zsh
|
||||||
|
|
||||||
antigen bundle ssh-agent
|
# config/functions
|
||||||
antigen bundle colored-man-pages
|
x-default-antigen-bundles
|
||||||
antigen bundle jreese/zsh-titles
|
|
||||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
|
||||||
antigen bundle zsh-users/zsh-completions
|
|
||||||
antigen bundle MichaelAquilina/zsh-you-should-use
|
|
||||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
|
||||||
antigen bundle Sparragus/zsh-auto-nvm-use
|
|
||||||
|
|
||||||
hash php 2>/dev/null && antigen bundle php
|
antigen apply
|
||||||
hash nvm 2>/dev/null && antigen bundle nvm
|
|
||||||
hash docker 2>/dev/null && antigen bundle docker
|
|
||||||
hash python 2>/dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
|
||||||
hash jq 2>/dev/null && antigen bundle reegnz/jq-zsh-plugin
|
|
||||||
hash docker-compose 2>/dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
|
||||||
|
|
||||||
# Platform dependant bundles
|
|
||||||
if [[ $(uname) == 'Linux' ]]; then
|
|
||||||
antigen bundle command-not-found
|
|
||||||
elif [[ $(uname) == 'Darwin' ]]; then
|
|
||||||
# If we have brew installed
|
|
||||||
if command -v brew &> /dev/null; then
|
|
||||||
# Only enable brew plugin if brew exists
|
|
||||||
antigen bundle brew
|
|
||||||
# load Z
|
|
||||||
[[ -f "$(brew --prefix z)/etc/profile.d/z.sh" ]] && source "$(brew --prefix z)/etc/profile.d/z.sh"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
antigen apply
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
|
|||||||
17
config/alias
Normal file → Executable file
17
config/alias
Normal file → Executable file
@@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# macOS specific
|
|
||||||
|
|
||||||
# Get installed php versions from brew and setup aliases
|
# Get installed php versions from brew and setup aliases
|
||||||
function x-set-php-aliases
|
function x-set-php-aliases
|
||||||
@@ -42,6 +41,7 @@ if [[ $(uname) == 'Darwin' ]]; then
|
|||||||
|
|
||||||
x-set-php-aliases
|
x-set-php-aliases
|
||||||
|
|
||||||
|
# Laravel Sail shortcut
|
||||||
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
|
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
|
||||||
|
|
||||||
# Flush Directory Service cache
|
# Flush Directory Service cache
|
||||||
@@ -60,15 +60,12 @@ alias zapds='find . -name ".DS_Store" -print -delete'
|
|||||||
alias t='tail -f' # tail with follow flag on
|
alias t='tail -f' # tail with follow flag on
|
||||||
alias dn='du -chd1' # directory usage, return only the total
|
alias dn='du -chd1' # directory usage, return only the total
|
||||||
|
|
||||||
alias code_scanner="docker run \
|
alias code_scanner='docker run
|
||||||
--env SOURCE_CODE='${PWD}' \
|
--env SOURCE_CODE="$PWD"
|
||||||
--volume '${PWD}':/code \
|
--volume "${PWD}":/code
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
--volume /var/run/docker.sock:/var/run/docker.sock
|
||||||
registry.gitlab.com/gitlab-org/ci-cd/codequality:${CODEQUALITY_VERSION:-latest} \
|
registry.gitlab.com/gitlab-org/ci-cd/codequality:"${CODEQUALITY_VERSION:-latest}"
|
||||||
/code"
|
/code'
|
||||||
|
|
||||||
alias composerUp='composer global update'
|
|
||||||
alias npmUp='npm -g up'
|
|
||||||
|
|
||||||
alias zedit='$EDITOR ~/.dotfiles'
|
alias zedit='$EDITOR ~/.dotfiles'
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,22 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
export HIST_STAMPS="yyyy-mm-dd"
|
# Explicitly set XDG folders
|
||||||
|
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
|
export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
|
export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
|
export XDG_STATE_HOME="$HOME/.local/state"
|
||||||
|
export XDG_BIN_HOME="$HOME/.local/bin" # this one is custom
|
||||||
|
|
||||||
|
# History env variables
|
||||||
|
export HIST_STAMPS="yyyy-mm-dd"
|
||||||
# Larger bash history (allow 32³ entries; default is 500)
|
# Larger bash history (allow 32³ entries; default is 500)
|
||||||
export HISTSIZE=32768
|
export HISTSIZE=32768
|
||||||
export HISTFILESIZE=$HISTSIZE
|
export HISTFILESIZE=$HISTSIZE
|
||||||
# don't put duplicate lines or lines starting with space in the history.
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
# See bash(1) for more options
|
# See bash(1) for more options
|
||||||
export HISTCONTROL=ignoreboth
|
export HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
# Make some commands not show up in history
|
# Make some commands not show up in history
|
||||||
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"
|
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"
|
||||||
|
|
||||||
# And include the parameter for ZSH
|
# And include the parameter for ZSH
|
||||||
export HISTORY_IGNORE="(ls|cd|cd -|pwd|exit|date|* --help)"
|
export HISTORY_IGNORE="(ls|cd|cd -|pwd|exit|date|* --help)"
|
||||||
|
|
||||||
@@ -28,12 +33,7 @@ export GREP_OPTIONS="--color=auto"
|
|||||||
# update the values of LINES and COLUMNS.
|
# update the values of LINES and COLUMNS.
|
||||||
hash shopt 2> /dev/null && shopt -s checkwinsize
|
hash shopt 2> /dev/null && shopt -s checkwinsize
|
||||||
|
|
||||||
# Explicitly set XDG folders
|
export LC_ALL=fi_FI.utf8
|
||||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
|
||||||
export XDG_DATA_HOME="$HOME/.local/share"
|
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
|
||||||
export XDG_STATE_HOME="$HOME/.local/state"
|
|
||||||
export XDG_BIN_HOME="$HOME/.local/bin" # this one is custom
|
|
||||||
|
|
||||||
# Antigen configuration
|
# Antigen configuration
|
||||||
# https://github.com/zsh-users/antigen/wiki/Configuration
|
# https://github.com/zsh-users/antigen/wiki/Configuration
|
||||||
@@ -87,6 +87,7 @@ fi
|
|||||||
|
|
||||||
# z, https://github.com/rupa/z
|
# z, https://github.com/rupa/z
|
||||||
export _Z_DATA="$XDG_STATE_HOME/z"
|
export _Z_DATA="$XDG_STATE_HOME/z"
|
||||||
|
[[ -f "$XDG_BIN_HOME/z/z.sh" ]] && source "$XDG_BIN_HOME/z/z.sh"
|
||||||
|
|
||||||
# composer, https://getcomposer.org/
|
# composer, https://getcomposer.org/
|
||||||
if command -v composer &> /dev/null; then
|
if command -v composer &> /dev/null; then
|
||||||
@@ -138,4 +139,5 @@ fi
|
|||||||
|
|
||||||
# Load iterm2 shell integration
|
# Load iterm2 shell integration
|
||||||
# https://iterm2.com/documentation-shell-integration.html
|
# https://iterm2.com/documentation-shell-integration.html
|
||||||
[[ -f "$XDG_BIN_HOME/iterm2_shell_integration.zsh" ]] && source "$XDG_BIN_HOME/iterm2_shell_integration.zsh"
|
[[ -f "$XDG_BIN_HOME/iterm2_shell_integration.zsh" ]] \
|
||||||
|
&& source "$XDG_BIN_HOME/iterm2_shell_integration.zsh"
|
||||||
|
|||||||
@@ -65,3 +65,29 @@ function silent
|
|||||||
{
|
{
|
||||||
"$@" >&/dev/null
|
"$@" >&/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Defines default antigen bundles
|
||||||
|
function x-default-antigen-bundles
|
||||||
|
{
|
||||||
|
# these should be always available
|
||||||
|
antigen bundle colored-man-pages
|
||||||
|
antigen bundle command-not-found
|
||||||
|
antigen bundle ssh-agent
|
||||||
|
antigen bundle MichaelAquilina/zsh-you-should-use
|
||||||
|
antigen bundle Sparragus/zsh-auto-nvm-use
|
||||||
|
antigen bundle jreese/zsh-titles
|
||||||
|
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||||
|
antigen bundle zsh-users/zsh-completions
|
||||||
|
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||||
|
|
||||||
|
# these should be available if there's need
|
||||||
|
hash git 2> /dev/null && antigen bundle git
|
||||||
|
hash brew 2> /dev/null && antigen bundle brew
|
||||||
|
hash docker 2> /dev/null && antigen bundle docker
|
||||||
|
hash docker-compose 2> /dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
||||||
|
hash jq 2> /dev/null && antigen bundle reegnz/jq-zsh-plugin
|
||||||
|
hash nvm 2> /dev/null && antigen bundle nvm
|
||||||
|
hash php 2> /dev/null && antigen bundle php
|
||||||
|
hash python 2> /dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
||||||
|
hash rvm 2> /dev/null && antigen bundle unixorn/rvm-plugin
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Lakka zsh configuration.
|
# Lakka zsh configuration.
|
||||||
#
|
#
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
export PATH="/usr/local/bin:/usr/bin:/usr/sbin:$PATH"
|
export PATH="$HOME/bin:/usr/local/bin:/usr/bin:/usr/sbin:$PATH"
|
||||||
|
|
||||||
# Defaults
|
# Defaults
|
||||||
export DOTFILES="$HOME/.dotfiles"
|
export DOTFILES="$HOME/.dotfiles"
|
||||||
@@ -19,33 +19,23 @@ function x-load-configs()
|
|||||||
}
|
}
|
||||||
x-load-configs
|
x-load-configs
|
||||||
|
|
||||||
export PATH="$XDG_BIN_HOME:$HOME/bin:$HOME/.rvm/bin:$PATH"
|
export PATH="$XDG_BIN_HOME:$PATH"
|
||||||
export LC_ALL=fi_FI.utf8
|
export LC_ALL=fi_FI.utf8
|
||||||
|
|
||||||
|
export RVM_PATH="$HOME/.rvm"
|
||||||
|
export PATH="$RVM_PATH/bin:$PATH"
|
||||||
|
[[ -s "$RVM_PATH/scripts/rvm" ]] && source "$RVM_PATH/scripts/rvm" # Load RVM into a shell session *as a function*
|
||||||
|
|
||||||
# Try to load antigen, if present
|
# Try to load antigen, if present
|
||||||
[[ -f "$XDG_BIN_HOME/antigen.zsh" ]] && source "$XDG_BIN_HOME/antigen.zsh"
|
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
|
||||||
|
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
|
||||||
|
|
||||||
# If antigen was loaded
|
# If antigen was loaded
|
||||||
if command -v antigen &> /dev/null; then
|
if command -v antigen &> /dev/null; then
|
||||||
antigen use oh-my-zsh
|
antigen use oh-my-zsh
|
||||||
|
|
||||||
antigen bundle ssh-agent
|
# config/functions
|
||||||
antigen bundle colored-man-pages
|
x-default-antigen-bundles
|
||||||
antigen bundle jreese/zsh-titles
|
|
||||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
|
||||||
antigen bundle zsh-users/zsh-completions
|
|
||||||
antigen bundle MichaelAquilina/zsh-you-should-use
|
|
||||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
|
||||||
antigen bundle Sparragus/zsh-auto-nvm-use
|
|
||||||
antigen bundle autojump
|
|
||||||
antigen bundle command-not-found
|
|
||||||
antigen bundle unixorn/rvm-plugin
|
|
||||||
|
|
||||||
hash git 2>/dev/null && antigen bundle git
|
|
||||||
hash php 2>/dev/null && antigen bundle php
|
|
||||||
hash python 2>/dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
|
||||||
hash jq 2>/dev/null && antigen bundle reegnz/jq-zsh-plugin
|
|
||||||
hash docker-compose 2>/dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
|
||||||
|
|
||||||
antigen theme oskarkrawczyk/honukai-iterm-zsh honukai
|
antigen theme oskarkrawczyk/honukai-iterm-zsh honukai
|
||||||
|
|
||||||
@@ -56,6 +46,5 @@ alias logrotate='/usr/sbin/logrotate -s $HOME/logs/state'
|
|||||||
alias nano='nano -wS -$'
|
alias nano='nano -wS -$'
|
||||||
alias gpg=gpg2
|
alias gpg=gpg2
|
||||||
|
|
||||||
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
|
ACME_PATH="$HOME/.acme.sh"
|
||||||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" ]] # Load RVM into a shell session *as a function*
|
[[ -s "$ACME_PATH/acme.sh.env" ]] && . "$ACME_PATH/acme.sh.env"
|
||||||
. "$HOME/.acme.sh/acme.sh.env"
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
~/.local:
|
~/.local:
|
||||||
recursive: true
|
recursive: true
|
||||||
- create:
|
- create:
|
||||||
|
~/.cache:
|
||||||
|
~/.cache/git:
|
||||||
~/.config:
|
~/.config:
|
||||||
~/.local:
|
~/.local:
|
||||||
~/.local/share:
|
~/.local/share:
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ function section_install
|
|||||||
$0 install nvm
|
$0 install nvm
|
||||||
$0 install npm
|
$0 install npm
|
||||||
$0 install ntfy
|
$0 install ntfy
|
||||||
|
$0 install z
|
||||||
;;
|
;;
|
||||||
antigen)
|
antigen)
|
||||||
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" \
|
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" \
|
||||||
@@ -51,16 +52,21 @@ function section_install
|
|||||||
;;
|
;;
|
||||||
nvm)
|
nvm)
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash \
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash \
|
||||||
|
&& git checkout "$HOME/.zshrc" \
|
||||||
&& nvm install --lts --latest-npm --default \
|
&& nvm install --lts --latest-npm --default \
|
||||||
&& msg_done "🎉 nvm installed!"
|
&& msg_done "🎉 nvm installed!"
|
||||||
;;
|
;;
|
||||||
npm)
|
npm)
|
||||||
bash "$DOTFILES/scripts/install-npm-packages.sh" \
|
bash "$DOTFILES/scripts/install-npm-packages.sh" \
|
||||||
&& msg_done "NPM Packages have been installed!"
|
&& msg_done "🎉 NPM Packages have been installed!"
|
||||||
;;
|
;;
|
||||||
ntfy)
|
ntfy)
|
||||||
bash "$DOTFILES/scripts/install-ntfy.sh" \
|
bash "$DOTFILES/scripts/install-ntfy.sh" \
|
||||||
&& msg_done "ntfy installed!"
|
&& msg_done "🎉 ntfy installed!"
|
||||||
|
;;
|
||||||
|
z)
|
||||||
|
bash "$DOTFILES/scripts/install-z.sh" \
|
||||||
|
&& msg_done "🎉 Z has been installed!"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
menu_section "$USAGE_PREFIX" "all | antigen | composer | starship | macos | nvm | npm"
|
menu_section "$USAGE_PREFIX" "all | antigen | composer | starship | macos | nvm | npm"
|
||||||
@@ -72,6 +78,7 @@ function section_install
|
|||||||
menu_item "nvm" "Install Node Version Manager (nvm)"
|
menu_item "nvm" "Install Node Version Manager (nvm)"
|
||||||
menu_item "npm" "Install NPM Packages"
|
menu_item "npm" "Install NPM Packages"
|
||||||
menu_item "ntfy" "Install ntfy"
|
menu_item "ntfy" "Install ntfy"
|
||||||
|
menu_item "z" "Install z"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,33 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
NTFY_VERSION=2.2.0
|
set -e
|
||||||
NTFY_URL="https://github.com/binwiederhier/ntfy"
|
|
||||||
NTFY_DEST="ntfy_${NTFY_VERSION}_macOS_all"
|
|
||||||
|
|
||||||
curl -L "$NTFY_URL/releases/download/v${NTFY_VERSION}/${NTFY_DEST}.tar.gz" > "${NTFY_DEST}.tar.gz"
|
if ! command -v ntfy &> /dev/null; then
|
||||||
tar zxvf "${NTFY_DEST}.tar.gz"
|
case $(dfm check arch) in
|
||||||
cp -a "${NTFY_DEST}/ntfy" ~/.local/bin/ntfy
|
Linux)
|
||||||
mkdir -p ~/.config/ntfy
|
NTFY_ARCH="linux_$(arch)"
|
||||||
cp "${NTFY_DEST}/client/client.yml" ~/.config/ntfy/client.yml
|
;;
|
||||||
ntfy --help
|
Darwin)
|
||||||
rm -rf "${NTFY_DEST}" "${NTFY_DEST}.tar.gz"
|
NTFY_ARCH="macOS_all"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
NTFY_VERSION=2.2.0
|
||||||
|
NTFY_URL="https://github.com/binwiederhier/ntfy"
|
||||||
|
NTFY_DEST="ntfy_${NTFY_VERSION}_${NTFY_ARCH}"
|
||||||
|
|
||||||
|
curl -L "$NTFY_URL/releases/download/v${NTFY_VERSION}/${NTFY_DEST}.tar.gz" \
|
||||||
|
> "${NTFY_DEST}.tar.gz"
|
||||||
|
tar zxvf "${NTFY_DEST}.tar.gz"
|
||||||
|
cp -a "${NTFY_DEST}/ntfy" ~/.local/bin/ntfy
|
||||||
|
mkdir -p ~/.config/ntfy
|
||||||
|
|
||||||
|
# copy config only if it does not exist
|
||||||
|
if [ ! -f "$HOME/.config/ntfy/client.yml" ]; then
|
||||||
|
cp "${NTFY_DEST}/client/client.yml" ~/.config/ntfy/client.yml
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf "${NTFY_DEST}" "${NTFY_DEST}.tar.gz"
|
||||||
|
else
|
||||||
|
echo "ntfy already installed"
|
||||||
|
fi
|
||||||
|
|||||||
10
scripts/install-z.sh
Executable file
10
scripts/install-z.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
Z_GIT_PATH="https://github.com/rupa/z.git"
|
||||||
|
Z_BIN_PATH="$XDG_BIN_HOME/z"
|
||||||
|
|
||||||
|
if [ ! -d "$Z_BIN_PATH" ]; then
|
||||||
|
git clone "$Z_GIT_PATH" "$Z_BIN_PATH"
|
||||||
|
else
|
||||||
|
echo "z ($Z_BIN_PATH/) already installed"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user