Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Maxime Bombar
Config_Files
Commits
0a48bcb6
Commit
0a48bcb6
authored
Feb 22, 2014
by
Valentin Samir
Browse files
[.bashrc] Stop find_up if directory does not exist
parent
f1116cc0
Changes
1
Show whitespace changes
Inline
Side-by-side
.bashrc
View file @
0a48bcb6
...
...
@@ -45,12 +45,17 @@ fi
# des infos quand on est dans un dépôt versionné
find_up
()
{
local
path normalized_path normalized_ret
path
=
"
$1
"
shift
1
while
[[
"
`
readlink
-f
--
\"
$path
\"
`
"
!=
"/"
]]
;
normalized_path
=
`
readlink
-f
--
"
$path
"
`
normalized_ret
=
$?
while
[[
"
$normalized_path
"
!=
"/"
]]
&&
[
$normalized_ret
-eq
0
]
;
do
find
"
$path
"
-maxdepth
1
-mindepth
1
"
$@
"
path
=
${
path
}
/..
normalized_path
=
`
readlink
-f
--
"
$path
"
`
normalized_ret
=
$?
done
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment