commit 207e7594535b48beccc29fb79e8f1f12636194f1
parent 70fe79247d8e8b71eea9291219935ae4ccd26718
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Tue, 26 Mar 2019 14:02:58 +0100
Remove unused executable scripts
Diffstat:
18 files changed, 0 insertions(+), 649 deletions(-)
diff --git a/bin/analysis-ssh b/bin/analysis-ssh
@@ -1,6 +0,0 @@
-#!/bin/sh
-# for tput commands: see `man 5 terminfo`
-echo "$(tput setaf 1)## Make sure to connect to Princeton VPN (Connect\ Tunnel.app) first ##$(tput sgr0)"
-pass -c Uni/noaa-rsa-pin
-echo "$(tput setaf 2)# Paste passphrase from clipboard (Cmd-v) + 6 RSA fob digits$(tput sgr0)"
-ssh Anders.Damsgaard@analysis-rsa.princeton.rdhpcs.noaa.gov
diff --git a/bin/cht.sh b/bin/cht.sh
@@ -1,389 +0,0 @@
-#!/usr/bin/env bash
-#
-# [X] open section
-# [X] one shot mode
-# [X] usage info
-# [X] dependencies check
-# [X] help
-# [X] yank/y/copy/c
-# [X] Y/C
-# [X] eof problem
-# [X] less
-# [X] stealth mode
-#
-# here are several examples for the stealth mode:
-#
-# zip lists
-# list permutation
-# random list element
-# reverse a list
-# read json from file
-# append string to a file
-# run process in background
-# count words in text counter
-# group elements list
-
-__CHTSH_VERSION=4
-__CHTSH_DATETIME="2018-07-08 22:26:46 +0200"
-
-export LESSSECURE=1
-STEALTH_MAX_SELECTION_LENGTH=5
-
-case "$OSTYPE" in
- darwin*) is_macos=yes ;;
- *) is_macos=no ;;
-esac
-
-get_query_options()
-{
- local query="$*"
- if [ -n "$CHTSH_QUERY_OPTIONS" ]; then
- if [[ $query == *\?* ]]; then
- query="$query&${CHTSH_QUERY_OPTIONS}"
- else
- query="$query?${CHTSH_QUERY_OPTIONS}"
- fi
- fi
- echo "$query"
-}
-
-do_query()
-{
- local query="$*"
- local b_opts=()
-
- if [ -e "$HOME/.cht.sh/id" ]; then
- b_opts=(-b "$HOME/.cht.sh/id")
- fi
-
- curl "${b_opts[@]}" -s https://cht.sh/"$(get_query_options $query)" > "$TMP1"
-
- if [ -z "$lines" ] || [ "$(wc -l "$TMP1" | awk '{print $1}')" -lt "$lines" ]; then
- cat "$TMP1"
- else
- less -R "$TMP1"
- fi
-}
-
-prepare_query()
-{
- local section="$1"; shift
- local input="$1"; shift
- local arguments="$1"; shift
-
- local query
- if [ -z "$section" ] || [[ "$input" = /* ]]; then
- query=$(echo "$input" | sed 's@ @/@; s@ @+@g')
- else
- query=$(echo "$section/$input" | sed 's@ @+@g')
- fi
-
- [ -n "$arguments" ] && arguments="?$arguments"
- echo "$query$arguments"
-}
-
-get_list_of_sections()
-{
- curl -s https://cht.sh/:list | grep -v '/.*/' | grep '/$'
-}
-
-if [ -e "$HOME"/.cht.sh/cht.sh.conf ]; then
- # shellcheck disable=SC1090,SC2002
- source <( cat "$HOME"/.cht.sh/cht.sh.conf | sed 's/#.*//' | grep -xv '' | sed s/^/CHTSH_/ ) >& /dev/null
-fi
-
-if [ "$1" == --read ]; then
- read -r a || a=exit
- echo $a
- exit 0
-elif [ "$1" == --help ] || [ -z "$1" ]; then
- cat <<EOF
-Usage:
-
- ${0##*/} --help show this help
- ${0##*/} --shell [LANG] shell mode (open LANG if specified)
- ${0##*/} QUERY process QUERY and exit
-EOF
- exit 0
-elif [ "$1" == --shell ]; then
- shell_mode=yes
- shift
-fi
-
-prompt="cht.sh"
-
-prompt="cht.sh"
-opts=""
-input=""
-for o; do
- if [[ "$o" == -* ]]; then
- opts="${opts}${o#-}"
- else
- input="$input $o"
- fi
-done
-query=$(echo "$input" | sed 's@ *$@@; s@^ *@@; s@ @/@; s@ @+@g')
-
-if [ "$shell_mode" != yes ]; then
- curl -s https://cht.sh/"$(get_query_options "$query")"
- exit 0
-else
- new_section="$1"
- valid_sections=($(get_list_of_sections))
- valid=no; for q in "${valid_sections[@]}"; do [[ "$q" == $new_section/ ]] && { valid=yes; break; }; done
-
- if [[ $valid = yes ]]; then
- section="$new_section"
- this_query="$(echo "$input" | sed 's@ *[^ ]* *@@')"
- this_prompt="\033[0;32mcht.sh/$section>\033[0m "
- else
- this_query="$input"
- this_prompt="\033[0;32mcht.sh>\033[0m "
- fi
- if [ -n "$this_query" ] && [ -z "$CHEATSH_RESTART" ]; then
- printf "$this_prompt$this_query\n"
- curl -s https://cht.sh/"$(get_query_options "$query")"
- fi
-fi
-
-if [ "$is_macos" != yes ]; then
- which xsel >& /dev/null || { echo 'DEPENDENCY: please install "xsel" for "copy"' >&2; }
-fi
-which rlwrap >& /dev/null || { echo 'DEPENDENCY: install "rlwrap" to use cht.sh in the shell mode' >&2; exit 1; }
-which curl >& /dev/null || { echo 'DEPENDENCY: install "curl" to use cht.sh' >&2; exit 1; }
-
-mkdir -p "$HOME/.cht.sh/"
-lines=$(tput lines)
-
-TMP1=$(mktemp /tmp/cht.sh.XXXXXXXXXXXXX)
-trap 'rm -f $TMP1 $TMP2' EXIT
-trap 'true' INT
-
-if ! [ -e "$HOME/.cht.sh/.hushlogin" ] && [ -z "$this_query" ]; then
- echo "type 'help' for the cht.sh shell help"
-fi
-
-while true; do
- if [ "$section" != "" ]; then
- full_prompt="$prompt/$section> "
- else
- full_prompt="$prompt> "
- fi
-
- input=$(
- rlwrap -H $HOME/.cht.sh/history -pgreen -C cht.sh -S "$full_prompt" bash "$0" --read | sed 's/ *#.*//'
- )
-
- case "$input" in
- '?'|h|help)
- cat <<EOF
-help - show this help
-hush - do not show the 'help' string at start anymore
-cd LANG - change the language context
-copy - copy the last answer in the clipboard (aliases: yank, y, c)
-ccopy - copy the last answer w/o comments (cut comments; aliases: cc, Y, C)
-exit - exit the cheat shell (aliases: quit, ^D)
-id [ID] - set/show an unique session id ("reset" to reset, "remove" to remove)
-stealth - stealth mode (automatic queries for selected text)
-update - self update (only if the scriptfile is writeable)
-version - show current cht.sh version
-/:help - service help
-QUERY - space ceparated query staring (examples are below)
- cht.sh> python zip list
- cht.sh/python> zip list
- cht.sh/go> /python zip list
-EOF
- continue
- ;;
- hush)
- mkdir -p $HOME/.cht.sh/ && touch $HOME/.cht.sh/.hushlogin && echo "Initial 'use help' message was disabled"
- continue
- ;;
- cd)
- section=""
- continue
- ;;
- "cd "*)
- new_section=$(echo "$input" | sed 's/cd //; s/ .*//; s@/\+$@@; s@^/\+@@')
- if [ "$new_section" = "" ] || [ "$new_section" = ".." ] || [ "$new_section" = / ]; then
- section=""
- else
- valid_sections=($(get_list_of_sections))
- valid=no; for q in "${valid_sections[@]}"; do [[ "$q" == $new_section/ ]] && { valid=yes; break; }; done
- if [ "$valid" = no ]; then
- echo "Invalid section: $new_section"
- echo "Valid sections:"
- echo "${valid_sections[@]}" | xargs printf "%-10s\n" | tr ' ' . | xargs -n 10 | sed 's/\./ /g; s/^/ /'
- continue
- else
- section="$new_section"
- fi
- fi
- continue
- ;;
- exit|quit)
- break
- ;;
- copy|yank|c|y)
- if [ -z "$DISPLAY" ]; then
- echo copy: supported only in the Desktop version
- continue
- fi
- if [ -z "$input" ]; then
- echo copy: Make at least one query first.
- continue
- else
- curl -s https://cht.sh/"$(get_query_options "$query"?T)" > "$TMP1"
- if [ "$is_macos" != yes ]; then
- xsel -i < "$TMP1"
- else
- cat "$TMP1" | pbcopy
- fi
- echo "copy: $(wc -l "$TMP1" | awk '{print $1}') lines copied to the selection"
- continue
- fi
- ;;
- ccopy|cc|C|Y)
- if [ -z "$DISPLAY" ]; then
- echo copy: supported only in the Desktop version
- continue
- fi
- if [ -z "$input" ]; then
- echo copy: Make at least one query first.
- continue
- else
- curl -s https://cht.sh/"$(get_query_options "$query"?TQ)" > "$TMP1"
- if [ "$is_macos" != yes ]; then
- xsel -i < "$TMP1"
- else
- cat "$TMP1" | pbcopy
- fi
- echo "copy: $(wc -l "$TMP1" | awk '{print $1}') lines copied to the selection"
- continue
- fi
- ;;
- id|"id "*)
- id_file="$HOME/.cht.sh/id"
-
- if [ "$input" = id ]; then
- new_id=""
- else
- new_id=$(echo "$input" | sed 's/id \+//; s/ *$//; s/ /+/g')
- fi
- if [ "$new_id" = remove ]; then
- if [ -e "$id_file" ]; then
- rm -f "$id_file" && echo "id is removed"
- else
- echo "id was not set, so you can't remove it"
- fi
- continue
- fi
- if [ -n "$new_id" ] && [ "$new_id" != reset ] && [ "$(echo $new_id | wc -c)" -lt 16 ]; then
- echo "ERROR: $new_id: Too short id. Minimal id length is 16. Use 'id reset' for a random id"
- continue
- fi
- if [ -z "$new_id" ]; then
- # if new_id is not specified check if we have some id already
- # if yes, just show it
- # if not, generate a new id
- if [ -e "$id_file" ]; then
- echo $(cat "$id_file" | awk '{if ($6 == "id") print $NF}' | head -1)
- continue
- else
- new_id=reset
- fi
- fi
- if [ "$new_id" = reset ]; then
- new_id="$(cat /dev/urandom 2> /dev/null | env LC_CTYPE=C tr -cd 'a-f0-9' 2> /dev/null | head -c 32)"
- else
- echo WARNING: if someone gueses your id, he can read your cht.sh search history
- fi
- if [ -e "$id_file" ] && grep -q '\tid\t[^\t]\+$' "$id_file" 2> /dev/null; then
- sed -i 's/\tid\t[^\t]\+$/ id '"$new_id"'/' "$id_file"
- else
- if ! [ -e "$id_file" ]; then
- printf '#\n\n' > "$id_file"
- fi
- printf ".cht.sh\tTRUE\t/\tTRUE\t0\tid\t$new_id\n" >> "$id_file"
- fi
- echo "$new_id"
- continue
- ;;
- stealth|"stealth "*)
- if [ "$input" != stealth ]; then
- arguments=$(echo "$input" | sed 's/stealth //; s/ /\&/')
- fi
- trap break SIGINT
- if [ "$is_macos" == yes ]; then
- past=$(pbpaste)
- else
- past=$(xsel -o)
- fi
- printf "\033[0;31mstealth:\033[0m you are in the stealth mode; select any text in any window for a query\n"
- printf "\033[0;31mstealth:\033[0m selections longer than $STEALTH_MAX_SELECTION_LENGTH words are ignored\n"
- if [ -n "$arguments" ]; then
- printf "\033[0;31mstealth:\033[0m query arguments: ?$arguments\n"
- fi
- printf "\033[0;31mstealth:\033[0m use ^C to leave this mode\n"
- while true; do
- if [ $is_macos == yes ]; then
- current=$(pbpaste)
- else
- current=$(xsel -o)
- fi
- if [ "$past" != "$current" ]; then
- past=$current
- current_text="$(echo $current | tr -c '[a-zA-Z0-9]' ' ')"
- if [ $(echo $current_text | wc -w) -gt "$STEALTH_MAX_SELECTION_LENGTH" ]; then
- echo "\033[0;31mstealth:\033[0m selection length is longer than $STEALTH_MAX_SELECTION_LENGTH words; ignoring"
- continue
- else
- printf "\n\033[0;31mstealth: \033[7m $current_text\033[0m\n"
- query=$(prepare_query "$section" "$current_text" "$arguments")
- do_query "$query"
- fi
- fi
- sleep 1;
- done
- trap - SIGINT
- continue
- ;;
- update)
- [ -w "$0" ] || { echo "The script is readonly; please update manually: curl -s https://cht.sh/:bash | sudo tee $0"; continue; }
- TMP2=$(mktemp /tmp/cht.sh.XXXXXXXXXXXXX)
- curl -s https://cht.sh/:cht.sh > "$TMP2"
- if ! cmp "$0" "$TMP2" > /dev/null 2>&1; then
- if grep -q ^__CHTSH_VERSION= "$TMP2"; then
- args=(--shell)
- [ -n "$section" ] && args=("${args[@]}" "$section")
- cp "$TMP2" "$0" && echo "Updated. Restarting..." && rm "$TMP2" && CHEATSH_RESTART=1 exec "$0" "${args[@]}"
- else
- echo "Something went wrong. Please update manually"
- fi
- else
- echo "cht.sh is up to date. No update needed"
- fi
- rm -f "$TMP2" > /dev/null 2>&1
- continue
- ;;
- version)
- echo "cht.sh version $__CHTSH_VERSION of $__CHTSH_DATETIME; installed at: $(stat -c %y "$0" | sed 's@\..* @ @')"
- TMP2=$(mktemp /tmp/cht.sh.XXXXXXXXXXXXX)
- if curl -s https://cht.sh/:cht.sh > "$TMP2"; then
- if ! cmp "$0" "$TMP2" > /dev/null 2>&1; then
- echo "Update needed (type 'update' for that)".
- else
- echo "Up to date. No update needed"
- fi
- fi
- rm -f "$TMP2" > /dev/null 2>&1
- continue
- ;;
- "")
- continue
- ;;
- esac
-
- query=$(prepare_query "$section" "$input")
- do_query "$query"
-done
diff --git a/bin/cosmo-ssh b/bin/cosmo-ssh
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-#if [[ "$(ip addr | grep 10.17.8)" ]]; then
-if [[ "$(ifconfig | grep 10.17)" ]]; then
- echo "On geo lan. Connecting directly..."
- #ssh -X adc@cosmo-server.au.dk
- ssh adc@cosmo-server.au.dk
-else
- echo "Outside geo lan, connecting through fresh-horse..."
- #autossh -X adc@fh.cs.au.dk -t 'autossh -X cosmo-server.au.dk'
- autossh -M 1234 adc@fh.cs.au.dk -t 'ssh cosmo-server.au.dk -t "./console.sh"'
-fi
diff --git a/bin/cosmo-sshfs b/bin/cosmo-sshfs
@@ -1,3 +0,0 @@
-#!/bin/sh
-ssh -f adc@fh.cs.au.dk -L 2222:cosmo-server.au.dk:22 -N
-sshfs -p 2222 adc@localhost:/home/adc/ /Users/ad/cosmo-server
diff --git a/bin/cosmo-sshfs-unmount b/bin/cosmo-sshfs-unmount
@@ -1,2 +0,0 @@
-#!/bin/sh
-fusermount -u /Users/ad/cosmo-server
diff --git a/bin/dark.sh b/bin/dark.sh
@@ -1,2 +0,0 @@
-#!/bin/sh
-xrdb ~/.Xdefaults
diff --git a/bin/democracy-now-dl b/bin/democracy-now-dl
@@ -1,54 +0,0 @@
-#!/bin/bash
-#set -e
-
-# get today's show if nothing else is specified
-DATE=$(date +%Y-%m%d)
-
-function help {
- echo "Democracy Now! downloader."
- echo "When called without any options, this script downloads today's "
- echo "episode of the daily independent news program 'Democracy Now!'."
- echo "Please consider donating to the show at http://democracynow.org."
- echo ""
- echo "Usage: $0 [OPTION]"
- echo ""
- echo "Options:"
- echo " -y Download the episode from yesterday instead of today"
- echo " -h Show this help"
- echo ""
- echo "Author: Anders Damsgaard, andersd@riseup.net"
-
- exit
-}
-
-while getopts ":yh" opt; do
- case $opt in
- y)
- DATE=$(date -v -1d +%Y-%m%d)
- ;;
- h)
- help
- ;;
- \?)
- echo "Invalid option: -$OPTARG" >&2
- help
- ;;
- esac
-done
-
-
-BASEURL=http://publish.dvlabs.com/democracynow/ipod/dn
-SUFFIX=.mp4
-OUTNAME=democracy_now
-
-echo "Downloading Democracy Now! episode for `date +'%a %b %d, %Y'`"
-wget --quiet --output-document="$OUTNAME$SUFFIX" "$BASEURL$DATE$SUFFIX"
-if [ $? == 0 ]; then
- echo "Saved as $OUTNAME$SUFFIX"
-else
- rm $OUTNAME$SUFFIX
- echo "Error: Download failed."
- echo "Try downloading the episode from yesterday by invoking:"
- echo " $0 -y"
- exit 1
-fi
diff --git a/bin/google-cloud-lamps-instance1-ssh.sh b/bin/google-cloud-lamps-instance1-ssh.sh
@@ -1,15 +0,0 @@
-#!/bin/bash
-set -e
-remotecommand='tmux attach -dt 0'
-host=adamsgaard.dk
-user=andersdc
-if [ "$1" = "-s" ]; then
- ssh $user@$host -t $remotecommand
-elif [ "$1" = "-a" ]; then
- autossh $user@$host
-else
- if [[ "$1" = "notmux" ]]; then
- remotecommand=""
- fi
- mosh $user@$host -- $remotecommand
-fi
diff --git a/bin/idkfa-ssh b/bin/idkfa-ssh
@@ -1,16 +0,0 @@
-#!/bin/bash
-set -e
-remotecommand='tmux attach'
-host=idkfa.ucsd.edu
-user=ad
-tmux rename-window idkfa
-if [ "$1" = "-s" ]; then
- ssh -X $user@$host -t $remotecommand
-elif [ "$1" = "-a" ]; then
- autossh $user@$host
-else
- if [ "$1" = "notmux" ]; then
- remotecommand=""
- fi
- mosh $user@$host -- $remotecommand
-fi
diff --git a/bin/idkfa-sshfs b/bin/idkfa-sshfs
@@ -1,6 +0,0 @@
-#!/bin/sh
-#mount=~/idkfa
-mount=/Volumes/idkfa
-sudo mkdir -p $mount; sudo chown $(whoami) $mount
-#ssh ad@132.239.153.219
-sshfs ad@idkfa.ucsd.edu:/home/ad/ $mount
diff --git a/bin/install_bspwm.sh b/bin/install_bspwm.sh
@@ -1,46 +0,0 @@
-#!/bin/sh
-
-# Using the guide from
-# https://github.com/windelicato/dotfiles/wiki/bspwm-for-dummies
-
-# Debian dependencies
-sudo apt-get install xcb libxcb-util0-dev libxcb-ewmh-dev libxcb-randr0-dev \
- libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-xinerama0-dev xfonts-terminus \
- hsetroot compton unclutter zathura conky
-
-# Fonts: search for artwiz-aleczapka fonts, download from sourceforce.
-# Extract fonts to /home/adc/.fonts
-# Run `sudo rm /etc/fonts/conf.d/70-no-bitmaps.conf
-# Clear the font cache:
-# sudo fc-cache -f -v
-# fc-cache -f -v
-
-# Core folder
-FOLDER=~/code
-
-cd $FOLDER && \
-git clone git@github.com:baskerville/bspwm.git && \
-cd bspwm && make && sudo make install
-
-cd $FOLDER && \
-git clone git@github.com:baskerville/sxhkd.git && \
-cd sxhkd && make && sudo make install
-
-# Panel
-cd $FOLDER && \
-git clone git@github.com:baskerville/sutils.git && \
-cd sutils && make && sudo make install
-
-cd $FOLDER && \
-git clone git@github.com:baskerville/xtitle.git && \
-cd xtitle && make && sudo make install
-
-cd $FOLDER && \
-git clone git@github.com:LemonBoy/bar.git && \
-cp ~/code/dotfiles/bar/config.h $FOLDER/bar/ &&
-cd bar && make && sudo make install
-
-# Panel configuration
-# Execute the following as root:
-# echo 'export PANEL_FIFO="/tmp/panel-fifo"' >> /etc/profile
-# echo 'export PANEL_FIFO="/tmp/panel-fifo"' >> /etc/zsh/zprofile
diff --git a/bin/light.sh b/bin/light.sh
@@ -1,2 +0,0 @@
-#!/bin/sh
-xrdb ~/.Xdefaults-light
diff --git a/bin/princeton-vpn b/bin/princeton-vpn
@@ -1,5 +0,0 @@
-#!/bin/bash -e
-
-pass -c Uni/princeton-netID-andersd
-open /Applications/Connect\ Tunnel.app
-
diff --git a/bin/solarized-dark.sh b/bin/solarized-dark.sh
@@ -1,2 +0,0 @@
-#!/bin/sh
-xrdb -merge $HOME/.colors/solarized
diff --git a/bin/solarized-light.sh b/bin/solarized-light.sh
@@ -1,2 +0,0 @@
-#!/bin/sh
-xrdb -merge $HOME/.colors/solarized_light
diff --git a/bin/tiger-ssh b/bin/tiger-ssh
@@ -1,6 +0,0 @@
-#!/bin/sh
-# for tput commands: see `man 5 terminfo`
-echo "$(tput setaf 1)## Make sure to connect to Princeton VPN (Connect\ Tunnel.app) first ##$(tput sgr0)"
-pass -c Uni/princeton-netID-andersd
-echo "$(tput setaf 2)# Paste passphrase from clipboard (Cmd-v)$(tput sgr0)"
-ssh andersd@tiger.princeton.edu
diff --git a/bin/ubuntu-headless b/bin/ubuntu-headless
@@ -1,70 +0,0 @@
-#!/bin/bash
-#vmpath="Documents/Virtual Machines.localized/Debian 8.x 64-bit.vmwarevm/Debian 8.x 64-bit.vmx"
-vmpath="$HOME/VMware Fusion VMs/ubuntu-virt.vmwarevm/ubuntu-virt.vmx"
-#ip=172.16.106.42
-sshfsmount=~/ubuntu
-cmd="tmux new-session -A -s misc"
-
-# 1. In vmware fusion gui app, configure network adapter to "Internet
-# Sharing: Share with my Mac". Copy the MAC address under "Advanced options"
-# 2. Insert an entry like the following to
-# /Library/Preferences/VMware\ Fusion/vmnet8/dhcpd.conf :
-# host Windows8x64 {
-# hardware ethernet 00:0C:29:B6:22:3E;
-# fixed-address 192.168.167.80;
-# }
-# 3. Afterwards, restart vmnet DHCP with
-# sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
-# sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start
-ip=192.168.44.101
-#ip=$(vmrun getGuestIPAddress "$vmpath")
-echo "IP of VM: $ip"
-
-if [[ "$1" = "-h" ]]; then
- echo "usage: $0 [start|suspend|stop|status|copysshkey|notmux]"
- echo "If no arguments are passed this script will connect to the VM via ssh"
-
-elif [[ "$1" = "start" ]]; then
- vmrun -T fusion start "$vmpath" nogui
- vmrun list
-
-elif [[ "$1" = "suspend" ]]; then
- vmrun -T fusion suspend "$vmpath"
- vmrun list
-
-elif [[ "$1" = "stop" ]]; then
- vmrun -T fusion stop "$vmpath"
- vmrun list
-
-elif [[ "$1" = "status" ]]; then
- vmrun list
-
-elif [[ "$1" = "copysshkey" ]]; then
- ssh-copy-id -i ~/.ssh/id_rsa.pub "$ip"
-
-else
- if [[ "$1" = "notmux" ]]; then
- cmd=""
- fi
-
- if [ "$(vmrun list | head -n 1 | awk '{ print $4 }')" -lt "1" ]; then
- echo -n "Starting VM... "
- vmrun -T fusion start "$vmpath" nogui
- echo "done"
- vmrun list
- fi
-
- mkdir -p $sshfsmount
- sshfs $ip:/home/ad $sshfsmount
- ssh -Y $ip -t $cmd
-
- read -p "$(tput setaf 3)Suspend VM? [Y/n] $(tput sgr0)" -n 1 -r
- echo
- if [[ $REPLY =~ ^[Nn]$ ]]; then
- echo "Not suspending. Bye."
- else
- echo "Suspending VM..."
- vmrun -T fusion suspend "$vmpath"
- vmrun list
- fi
-fi
diff --git a/bin/uu-pip b/bin/uu-pip
@@ -1,11 +0,0 @@
-#!/bin/bash
-set -e
-
-echo "## Updating pip"
-for PIP in pip pip2 pip3; do
- [[ ! "$(type -P $PIP)" ]] && continue
- $PIP install --upgrade pip
- echo "## Updating $PIP packages"
- $PIP freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs $PIP install -U
-done
-