-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(#39): update meatbox scripts to be fully posix compliant
- Loading branch information
1 parent
fd3e17a
commit 46d0652
Showing
33 changed files
with
250 additions
and
146 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
# if [[ $- == *i* ]]; then | ||
# shellcheck source=.bashrc | ||
. "$HOME/.bashrc" | ||
# fi | ||
if [[ $- == *i* ]]; then | ||
# shellcheck source=.bashrc | ||
. "$HOME/.bashrc" | ||
fi |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
set -eu | ||
|
||
# TODO: requires much smarter implementation w/ handling of various managers, | ||
# operations, and flags | ||
meatman() { | ||
cmd="$1" | ||
packages="$2" | ||
|
||
if [ ! "$cmd" = "add" ]; then | ||
echo "command unsupported" | ||
exit 1 | ||
fi | ||
|
||
# TODO: handle flags | ||
if [ -x "$(command -v pacman)" ]; then | ||
sudo pacman -Sy --config "$HOME/.config/pacman/pacman.conf" --noconfirm --needed $packages | ||
elif [ -x "$(command -v apk)" ]; then | ||
sudo apk add --no-cache $packages | ||
else | ||
echo "unsupported distro" | ||
exit 1 | ||
fi | ||
} | ||
|
||
meatman "$@" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
set -eu | ||
|
||
scripts=" | ||
install_or_update_asdf.sh | ||
install_or_update_asdf.sh | ||
install_yarn.sh | ||
" | ||
|
||
bootstrap() { | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env bash | ||
#!/bin/sh | ||
|
||
set -euo pipefail | ||
set -eu | ||
|
||
pip install --user --upgrade \ | ||
pip \ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
#!/bin/sh | ||
|
||
set -euo pipefail | ||
set -eu | ||
|
||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/meatwallace/zplugin/master/doc/install.sh)" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
set -eu | ||
|
||
install_yarn() { | ||
if [ ! -x "$(command -v yarn)" ]; then | ||
# source our bashrc to make sure `asdf` is available | ||
# shellcheck source=../../.bashrc | ||
. "$HOME/.bashrc" | ||
|
||
meatman add yarn | ||
fi | ||
} | ||
|
||
install_yarn "$@" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env bash | ||
#!/bin/sh | ||
|
||
set -euo pipefail | ||
set -eu | ||
|
||
# fire up zsh to trigger zplugin initialization | ||
zsh |
This file contains 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
Oops, something went wrong.