Last active
October 8, 2021 11:09
-
-
Save lynsei/0039d94a2de7040c0fc6b2545b2edfde to your computer and use it in GitHub Desktop.
deprecated-functions.zsh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
/deprecated.zsh | |
# This is for dogi, but we aren't using him right now till I can fix his permissions in dockerland | |
function load_ssh_proxy_engine() { | |
yes | cp -f $ZSH_CUSTOM/src/lib/dogi/.dogi.sh /usr/local/bin/dogi | |
chmod +x /usr/local/bin/dogi | |
#note: this will only work on linux, but that's where this is gonna run (ubuntu docker minimal at 30MB) | |
adduser --disabled-password --shell /bin/bash dogi | |
addgroup docker || true | |
usermod -aG docker dogi | |
tee -a ~/.ssh/config << EOF | |
Host ssh-our-own-server | |
HostName 127.0.0.1 | |
User user | |
RequestTTY force | |
EOF | |
ssh dogi-server dogi help & | |
ps aux | grep dogi | |
} | |
# build directory generator for new docker images from sub modules | |
function build_path() { | |
(mkdir -p ) | |
} | |
function alpine_git() { | |
(docker run -ti --rm -v ${HOME}:/root -v $(pwd):/git alpine/git "$@") | |
} | |
function get_docker() { | |
echo "No Docker. Installing it, then the task runner completions!" | |
`${lyns_docker}` | |
yarn global add "$@" --prefix /usr/local/bin | |
which "$@" | |
} | |
function docker_exists() { | |
if hash docker 2>/dev/null; then | |
docker "$@" | |
else | |
get_docker "$@" | |
fi | |
} | |
function install_yarn () { | |
if hash yarn 2>/dev/null; then | |
yarn global add "$@" --prefix /usr/local/bin | |
which "$@" | |
else | |
echo "No Yarn. Installing it, then the task runner completions!" | |
brew install yarn | |
yarn global add "$@" --prefix /usr/local/bin | |
which "$@" | |
fi | |
} | |
function is_gulp (){ | |
if hash gulp 2>/dev/null; then | |
gulp "$@" | |
elsea | |
echo "installing gulp" | |
install_yarn "gulp" | |
gulp "$@" | |
export gulp_completion = $("is_gulp --completion=zsh") | |
fi | |
} | |
function is_grunt (){ | |
if hash grunt 2>/dev/null; then | |
grunt "$@" | |
else | |
echo "installing grunt" | |
install_yarn "grunt" | |
grunt "$@" | |
export grunt_completion = $("is_grunt --completion=zsh") | |
fi | |
} | |
# load completions for zsh | |
(is_grunt --completion=zsh) | |
(is_gulp --completion=zsh) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment