Skip to content

Commit

Permalink
🔒 🎨 Set 700 and change name
Browse files Browse the repository at this point in the history
  • Loading branch information
amaya382 committed Jan 28, 2020
1 parent d826643 commit e6672ab
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions example/.anyrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,10 @@ export VIMINIT="let \$MYVIMRC='${ANYRC_HOME}/.vimrc' | source \${MYVIMRC}"

## tmux
tmux() {
local TMUX_DIR_SUFFIX="$(hostname)-$(whoami)"
if [ $(which sha1sum) ]; then
TMUX_DIR_SUFFIX="$(echo \"${TMUX_DIR_SUFFIX}\" \
| sha1sum \
| sed 's/.*\([a-f0-9]\{40\}\).*/\1/' \
| cut -c 1-7)"
elif [ $(which openssl) ]; then
TMUX_DIR_SUFFIX="$(echo \"${TMUX_DIR_SUFFIX}\" \
| openssl sha1 \
| sed 's/.*\([a-f0-9]\{40\}\).*/\1/' \
| cut -c 1-7)"
fi
local TMUX_DIR="/tmp/tmp.tmux-${TMUX_DIR_SUFFIX}"
local TMUX_DIR="/tmp/anyrc.tmux.$(whoami)"
[ ! -d "${TMUX_DIR}" ] && rm -rf "${TMUX_DIR}"
mkdir -p "${TMUX_DIR}"
chmod 700 "${TMUX_DIR}"

# Copy all of anyrc for inside of tmux
cp -rf "${ANYRC_DANYRC}" "${ANYRC_DANYRCD}" "${TMUX_DIR}" &> /dev/null
Expand Down

0 comments on commit e6672ab

Please sign in to comment.