1
0
Fork 0

Compare commits

...

2 commits

Author SHA1 Message Date
Adrien Abraham 14c08f8b6c install: add fancy install script 2022-09-07 12:19:27 +02:00
Adrien Abraham ebf747e214 git-config-user: show current config 2022-09-07 12:19:18 +02:00
2 changed files with 18 additions and 0 deletions

View file

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
# Quickly setup user name and email. # Quickly setup user name and email.
echo "Current name: $(git config user.name)"
echo "Current email: $(git config user.email)"
read -p "User name: " name read -p "User name: " name
git config user.name "$name" git config user.name "$name"
read -p "User email: " email read -p "User email: " email

16
install.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
ensure_has() {
if ! command -v "$1" > /dev/null; then
echo "Can't find $1."
exit 1
fi
}
ensure_has fdfind
ensure_has fzf
ensure_has install-script
fdfind -t x \
| fzf -m --layout=reverse \
| while read -r script; do install-script "$script"; done