mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-15 22:52:37 +00:00
Compare commits
2 Commits
0d916fe960
...
df876d2cac
| Author | SHA1 | Date | |
|---|---|---|---|
|
df876d2cac
|
|||
|
e052f0c394
|
1
TODO.md
1
TODO.md
@@ -27,6 +27,7 @@ A list of in-progress and completed todo's.
|
|||||||
- [ ] Need to ensure ssh keys are setup before private submodules are loaded / installed,
|
- [ ] Need to ensure ssh keys are setup before private submodules are loaded / installed,
|
||||||
so I need to make sure that Yubikey setup runs early and works for ssh authentication.
|
so I need to make sure that Yubikey setup runs early and works for ssh authentication.
|
||||||
- [ ] Setup a new machine / virtual machine to test, as it's hard to test the scripts once a machine is setup.
|
- [ ] Setup a new machine / virtual machine to test, as it's hard to test the scripts once a machine is setup.
|
||||||
|
- [ ] Need to add `repos` script when bootstrapping.
|
||||||
|
|
||||||
### Keyboard / kanata
|
### Keyboard / kanata
|
||||||
|
|
||||||
|
|||||||
2
env/.config/zsh/functions/dp
vendored
2
env/.config/zsh/functions/dp
vendored
@@ -7,6 +7,6 @@ function dp() {
|
|||||||
local temperature=$1
|
local temperature=$1
|
||||||
local humidity=$2
|
local humidity=$2
|
||||||
|
|
||||||
/opt/homebrew/bin/psychrometrics dew-point --dry-bulb "$temperature" --relative-humidity "$humidity"
|
psychrometrics dew-point --dry-bulb "$temperature" --relative-humidity "$humidity"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
56
repos
Executable file
56
repos
Executable file
@@ -0,0 +1,56 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
DEST="$HOME/dev"
|
||||||
|
dry_run_flag="0"
|
||||||
|
|
||||||
|
log() {
|
||||||
|
if [[ $dry_run_flag == "1" ]]; then
|
||||||
|
echo "[DRY RUN]: $*"
|
||||||
|
else
|
||||||
|
echo "$*"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
clone() {
|
||||||
|
local src=${1:-""}
|
||||||
|
local dest=${2:-$DEST}
|
||||||
|
log "Cloning '$src' in '$dest'"
|
||||||
|
if [[ $dry_run_flag == "0" ]]; then
|
||||||
|
pushd "$dest" || exit 1 &>/dev/null
|
||||||
|
(
|
||||||
|
git clone "$src"
|
||||||
|
)
|
||||||
|
popd &>/dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install-psychrometrics() {
|
||||||
|
log "Installing psychrometrics cli."
|
||||||
|
if [[ $dry_run_flag == "0" ]]; then
|
||||||
|
local src="$DEST/psychrometrics-cli"
|
||||||
|
pushd "$src" || exit 1 &>/dev/null
|
||||||
|
(
|
||||||
|
./install-linux.sh
|
||||||
|
)
|
||||||
|
popd &>/dev/null
|
||||||
|
rm -rf "$src"
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
##### MAIN #####
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
if [[ $1 =~ ^-d ]] || [[ $1 =~ ^--dry ]]; then
|
||||||
|
dry_run_flag="1"
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir -p "$DEST/sites" &>/dev/null
|
||||||
|
clone "git@github.com:m-housh/mhoush.com.git" "$DEST/sites"
|
||||||
|
clone "git@github.com:swift-psychrometrics/psychrometrics-cli.git" && install-psychrometrics
|
||||||
Reference in New Issue
Block a user