Files
dotfiles/meta/submodules
druckdev b1d396babd *: Use /usr/bin/env in shebangs for bash & zsh
To increase the portability (OSX for example has zsh under `/bin/zsh`).
2021-07-14 13:48:21 +02:00

18 lines
363 B
Bash
Executable File

#!/usr/bin/env bash
[[ $# -eq 1 ]] || { echo "Specify what to do" >&2; exit 1; }
case "$1" in
"--init") INIT=1;;
"--update") INIT=0;;
*) echo "Unknown option"; exit 1;;
esac
if (( $INIT )); then
git submodule update --init --recursive --jobs 8 --depth 1 2>&1 \
| grep "Cloning into" \
|| ! (( ${PIPESTATUS[0]} ))
else
git submodule update --remote
fi