12 lines
152 B
Bash
Executable file
12 lines
152 B
Bash
Executable file
#!/bin/bash
|
|
|
|
dir="$1"
|
|
if [[ -d "$1/.git" ]]; then
|
|
cd "$1"
|
|
git clean -fq
|
|
git pull
|
|
else
|
|
echo "error: $1 is not a git repo"
|
|
exit 1
|
|
fi
|
|
|