Skip to content

Commit

Permalink
🔖 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
amaya382 committed Feb 6, 2020
1 parent 00b783f commit 2c581c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ Just use `*rc` commands instead of original commands

### Setup
```sh
# If you want to install the latest version, change 0.0.1 to master in the url
# If you want to install the latest version, change version to master in the url and set VERSION
# VERSION: anyrc version (default: same as install script version)
# DIR: Where to install (default: /usr/local/bin)
# FORCE: If defined, override .anyrc (default: undefined)
curl -sS https://raw.githubusercontent.com/amaya382/anyrc/0.0.1/install.sh | DIR=/usr/local/bin bash
curl -sS https://raw.githubusercontent.com/amaya382/anyrc/0.0.2/install.sh | DIR=/usr/local/bin bash

# Put your dotfiles or create symlinks of them into $HOME/.anyrc.d
ln -s /path/to/your/dotfiles/.dotfile $HOME/.anyrc.d/.dotfile
Expand Down
5 changes: 3 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/bin/bash -eu

: ${VERSION:='0.0.2'}
: ${DIR:='/usr/local/bin'}
[ "$(ls -ld ${DIR} | cut -d' ' -f3)" != "${USER}" ] && SUDO='sudo' || SUDO=''
echo "Installing anyrc commands into ${DIR} ..."
for cmd in dockrc kuberc dockerrunrc dockerexecrc kubectlexecrc; do
${SUDO} rm "${DIR}/${cmd}" &> /dev/null # Remove old commands
done
for cmd in anyrc sshrc dockerrc kubectlrc surc; do
${SUDO} curl -sSL "https://github.com/amaya382/anyrc/raw/master/${cmd}" -o "${DIR}/${cmd}"
${SUDO} curl -sSL "https://github.com/amaya382/anyrc/raw/${VERSION}/${cmd}" -o "${DIR}/${cmd}"
${SUDO} chmod +x "${DIR}/${cmd}"
done

Expand All @@ -22,7 +23,7 @@ fi

if [ -z "${SKIP_DANYRC:+_}" ]; then
echo "Installing ${HOME}/.anyrc ..."
curl -sSL https://github.com/amaya382/anyrc/raw/master/example/.anyrc \
curl -sSL https://github.com/amaya382/anyrc/raw/${VERSION}/example/.anyrc \
-o ~/.anyrc
fi
echo "Creating ${HOME}/.anyrc.d ..."
Expand Down

0 comments on commit 2c581c4

Please sign in to comment.