mirror of
https://github.com/samsonjs/config.git
synced 2026-06-24 04:59:08 +00:00
Set up jj name and email in init.sh
This commit is contained in:
parent
869f56305b
commit
95222a65b9
1 changed files with 23 additions and 0 deletions
23
init.sh
23
init.sh
|
|
@ -61,4 +61,27 @@ for FILE in "$CONFIG_PATH"/*; do
|
|||
fi
|
||||
done
|
||||
|
||||
setup_jj_identity() {
|
||||
if ! command -v jj >/dev/null 2>&1; then
|
||||
echo "Note: jj is not installed, skipping jj identity setup"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if ! jj config get user.name >/dev/null 2>&1; then
|
||||
jj config set --user user.name "Sami Samhuri"
|
||||
echo "→ Set jj user.name"
|
||||
else
|
||||
echo "✓ jj user.name already set"
|
||||
fi
|
||||
|
||||
if ! jj config get user.email >/dev/null 2>&1; then
|
||||
jj config set --user user.email "sami@samhuri.net"
|
||||
echo "→ Set jj user.email"
|
||||
else
|
||||
echo "✓ jj user.email already set"
|
||||
fi
|
||||
}
|
||||
|
||||
setup_jj_identity
|
||||
|
||||
echo "Done!"
|
||||
|
|
|
|||
Loading…
Reference in a new issue