mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
git-setup: create a directory if the provided one does not exist yet. Additionally, enables the creation of directories with names containing spaces in a more fashion way. Example: 'git setup path/to/repo name'.
Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
This commit is contained in:
parent
954f3d5f45
commit
b8023be66a
|
|
@ -1,7 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
dir=${1-.}
|
||||
cd $dir \
|
||||
dir=$(test -z "$*" && echo "." || echo "$*")
|
||||
mkdir -p "$dir" \
|
||||
&& cd "$dir" \
|
||||
&& git init \
|
||||
&& git add . \
|
||||
&& git commit -m 'Initial commit'
|
||||
|
|
|
|||
Loading…
Reference in a new issue