(bash) fix unintentional setting url to blank
this is related to the clone repo function
This commit is contained in:
parent
7dc47eae0c
commit
dfe6245aaa
1 changed files with 0 additions and 3 deletions
|
|
@ -145,10 +145,8 @@ fcd() {
|
|||
cl() {
|
||||
local url=$1
|
||||
local ghq_dir="$HOME/ghq"
|
||||
local argc=$#
|
||||
local project_name=""
|
||||
local repository_name=""
|
||||
local url=""
|
||||
|
||||
# extract project name
|
||||
if [[ $url =~ git@git(lab|hub)\.com:([^/]+)/([^/]+)\.git ]]; then
|
||||
|
|
@ -175,7 +173,6 @@ cl() {
|
|||
|
||||
# check if directory for project exists or not
|
||||
local project_dir="${ghq_dir}/${namespace}/${repository_name}"
|
||||
echo $project_dir
|
||||
if [[ ! -d $project_dir ]]; then
|
||||
mkdir -p $project_dir
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue