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
Membres actifs
fichiers_configuration
Commits
245ef741
Commit
245ef741
authored
Jul 22, 2013
by
Valentin Samir
Browse files
[bashrc] umaskrc, on return 0 si .umaskrc n'existe pas
parent
033cd572
Changes
1
Hide whitespace changes
Inline
Side-by-side
.bashrc
View file @
245ef741
...
...
@@ -103,7 +103,11 @@ fi
# Rien de spécial n'arrivera si vous n'avez pas le fichier .umaskrc
function
cd
{
builtin cd
"
$@
"
[
-f
~/.umaskrc
]
&&
umask
$(
/usr/bin/awk
'BEGIN {pwd=ENVIRON["PWD"]; a=length(pwd); cmax=0} {if($1==pwd) {MASK=$2;exit}; c=length($1); if(c>a) {next}; if(substr(pwd,0,c)==$1 && c > cmax) {cmax=c; MASK=$2}} END {print MASK}'
~/.umaskrc
)
>
/dev/null
if
[
-f
~/.umaskrc
]
;
then
umask
$(
/usr/bin/awk
'BEGIN {pwd=ENVIRON["PWD"]; a=length(pwd); cmax=0} {if($1==pwd) {MASK=$2;exit}; c=length($1); if(c>a) {next}; if(substr(pwd,0,c)==$1 && c > cmax) {cmax=c; MASK=$2}} END {print MASK}'
~/.umaskrc
)
>
/dev/null
else
return
0
fi
}
### Attention à ce que vous éditez dans cette section ###
...
...
Write
Preview
Supports
Markdown
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