2022-05-28 21:59:57 +00:00
|
|
|
#! /usr/bin/env bash
|
|
|
|
function main() {
|
|
|
|
if (! type curl >/dev/null 2>&1); then
|
|
|
|
echo '`curl` isn'\''t installed, please install curl first.'
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
|
|
|
if (type chezmoi >/dev/null 2>&1); then
|
|
|
|
if [ -d ~/.local/share/chezmoi ] ; then
|
|
|
|
echo '`chezmoi` is already installed and initialized, this script should only be used for initializing'
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
sh -c "$(curl -fsLS chezmoi.io/get)" -- init --apply Lockszmith
|
2022-05-29 07:23:13 +00:00
|
|
|
|
|
|
|
echo ''
|
|
|
|
echo 'You should restart the shell (`exec $SHELL`) or re-login, and then run `sz-doctor.sh` to check'
|
|
|
|
echo ''
|
2022-05-28 21:59:57 +00:00
|
|
|
}
|
|
|
|
main
|