Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
7339896d
Commit
7339896d
authored
19 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
ITS#3752: Update to shtool 2.0.2
parent
4a107089
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build/shtool
+27
-17
27 additions, 17 deletions
build/shtool
with
27 additions
and
17 deletions
build/shtool
+
27
−
17
View file @
7339896d
#!/bin/sh
##
## GNU shtool -- The GNU Portable Shell Tool
## Copyright (c) 1994-200
4
Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1994-200
5
Ralf S. Engelschall <rse@engelschall.com>
##
## See http://www.gnu.org/software/shtool/ for more information.
## See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
##
## Version: 2.0.
1
(1
1-Aug
-200
4
)
## Version: 2.0.
2
(1
5-Jun
-200
5
)
## Contents: 6/19 available modules
##
...
...
@@ -67,8 +67,8 @@ if [ $# -eq 0 ]; then
exit
1
fi
if
[
".
$1
"
=
".-h"
]
||
[
".
$1
"
=
".--help"
]
;
then
echo
"This is GNU shtool, version 2.0.
1
(1
1-Aug
-200
4
)"
echo
"Copyright (c) 1994-200
4
Ralf S. Engelschall <rse@engelschall.com>"
echo
"This is GNU shtool, version 2.0.
2
(1
5-Jun
-200
5
)"
echo
"Copyright (c) 1994-200
5
Ralf S. Engelschall <rse@engelschall.com>"
echo
"Report bugs to <bug-shtool@gnu.org>"
echo
''
echo
"Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
...
...
@@ -136,11 +136,11 @@ if [ ".$1" = ".-h" ] || [ ".$1" = ".--help" ]; then
exit
0
fi
if
[
".
$1
"
=
".-v"
]
||
[
".
$1
"
=
".--version"
]
;
then
echo
"GNU shtool 2.0.
1
(1
1-Aug
-200
4
)"
echo
"GNU shtool 2.0.
2
(1
5-Jun
-200
5
)"
exit
0
fi
if
[
".
$1
"
=
".-r"
]
||
[
".
$1
"
=
".--recreate"
]
;
then
shtoolize
-o
build
/
shtool
echo
move
install mkdir
mkln subst
shtoolize
-oshtool
echo
move
install mkdir
mkln subst
exit
0
fi
if
[
".
$1
"
=
".-d"
]
||
[
".
$1
"
=
".--debug"
]
;
then
...
...
@@ -404,6 +404,7 @@ esac
# establish a temporary file on request
if
[
".
$gen_tmpfile
"
=
.yes
]
;
then
# create (explicitly) secure temporary directory
if
[
".
$TMPDIR
"
!=
.
]
;
then
tmpdir
=
"
$TMPDIR
"
elif
[
".
$TEMPDIR
"
!=
.
]
;
then
...
...
@@ -411,10 +412,19 @@ if [ ".$gen_tmpfile" = .yes ]; then
else
tmpdir
=
"/tmp"
fi
tmpfile
=
"
$tmpdir
/.shtool.
$$
"
rm
-f
$tmpfile
>
/dev/null 2>&1
touch
$tmpfile
chmod
600
$tmpfile
tmpdir
=
"
$tmpdir
/.shtool.
$$
"
(
umask
077
rm
-rf
"
$tmpdir
"
>
/dev/null 2>&1
||
true
mkdir
"
$tmpdir
"
>
/dev/null 2>&1
if
[
$?
-ne
0
]
;
then
echo
"
$msgprefix
:Error: failed to create temporary directory
\`
$tmpdir
'"
1>&2
exit
1
fi
)
# create (implicitly) secure temporary file
tmpfile
=
"
$tmpdir
/shtool.tmp"
touch
"
$tmpfile
"
fi
# utility function: map string to lower case
...
...
@@ -431,7 +441,7 @@ util_upper () {
shtool_exit
()
{
rc
=
"
$1
"
if
[
".
$gen_tmpfile
"
=
.yes
]
;
then
rm
-f
$tmp
file
>
/dev/null 2>&1
||
true
rm
-
r
f
"
$tmp
dir
"
>
/dev/null 2>&1
||
true
fi
exit
$rc
}
...
...
@@ -445,7 +455,7 @@ case $tool in
echo
)
##
## echo -- Print string with optional construct expansion
## Copyright (c) 1998-200
4
Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1998-200
5
Ralf S. Engelschall <rse@engelschall.com>
##
text
=
"
$*
"
...
...
@@ -743,7 +753,7 @@ echo )
move
)
##
## move -- Move files with simultaneous substitution
## Copyright (c) 1999-200
4
Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1999-200
5
Ralf S. Engelschall <rse@engelschall.com>
##
src
=
"
$1
"
...
...
@@ -835,7 +845,7 @@ move )
install
)
##
## install -- Install a program, script or datafile
## Copyright (c) 1997-200
4
Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1997-200
5
Ralf S. Engelschall <rse@engelschall.com>
##
# special case: "shtool install -d <dir> [...]" internally
...
...
@@ -998,7 +1008,7 @@ install )
mkdir
)
##
## mkdir -- Make one or more directories
## Copyright (c) 1996-200
4
Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1996-200
5
Ralf S. Engelschall <rse@engelschall.com>
##
errstatus
=
0
...
...
@@ -1086,7 +1096,7 @@ mkdir )
mkln
)
##
## mkln -- Make link with calculation of relative paths
## Copyright (c) 1998-200
4
Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1998-200
5
Ralf S. Engelschall <rse@engelschall.com>
##
# determine source(s) and destination
...
...
@@ -1237,7 +1247,7 @@ mkln )
subst
)
##
## subst -- Apply sed(1) substitution operations
## Copyright (c) 2001-200
4
Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 2001-200
5
Ralf S. Engelschall <rse@engelschall.com>
##
# remember optional list of file(s)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment