repo.or.cz
/
NixPkgs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
vuls: init at 0.27.0 (#348530)
[NixPkgs.git]
/
pkgs
/
os-specific
/
bsd
/
lib
/
install-wrapper.sh
blob
97a2aaab22c0eb2af8b91a4a7bac76f54385cde3
1
set -eu
2
3
args
=()
4
declare -i
path_args
=
0
5
6
while
((
$#
));
do
7
if
((
$#
==
1
));
then
8
if
((
path_args
>
1
))
||
[[
"
$1
"
= */ ]];
then
9
mkdir
-p
"
$1
"
10
else
11
mkdir
-p
"$(dirname "
$1
")"
12
fi
13
fi
14
case
$1
in
15
-C
) ;;
16
-o
|
-g
)
shift
;;
17
-m
|
-l
)
18
# handle next arg so not counted as path arg
19
args
+=(
"
$1
"
"
$2
"
)
20
shift
21
;;
22
-*)
args
+=(
"
$1
"
) ;;
23
*)
24
path_args
+=
1
25
args
+=(
"
$1
"
)
26
;;
27
esac
28
shift
29
done