Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Open Source Software
Zipr Toolchain
Commits
82f91b1c
Commit
82f91b1c
authored
13 years ago
by
jdh8d
Browse files
Options
Downloads
Patches
Plain Diff
Fixed error when VERBOSE was set.
parent
a69ad617
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
tools/ps_analyze.sh
+9
-11
9 additions, 11 deletions
tools/ps_analyze.sh
with
9 additions
and
11 deletions
tools/ps_analyze.sh
+
9
−
11
View file @
82f91b1c
...
...
@@ -62,21 +62,19 @@ perform_step()
logfile
=
logs/
$step
.log
if
[
!
-z
"
$VERBOSE
"
]
;
then
TEE
=
" 2>&1 | tee
$logfile
"
else
TEE
=
" >
$logfile
2>&1"
fi
echo
-n
Performing step
"
$step
"
...
starttime
=
`
date
`
# run the command and redirect to a file. if verbose is on, also redirect to stdout.
eval
$command
$TEE
# If verbose is on, tee to a file
if
[
!
-z
"
$VERBOSE
"
]
;
then
$command
2>&1 |
tee
$logfile
command_exit
=
${
PIPESTATUS
[0]
}
# this funkiness gets the exit code of $command, not tee
else
$command
>
$logfile
2>&1
command_exit
=
$?
fi
# record the exit command of $command. We need the funky pipestatus thing to ensure we don't get the
# exit code for TEE.
command_exit
=
${
PIPESTATUS
[0]
}
echo command exit
status
for
step
$step
is
$command_exit
is_step_error
$step
$command_exit
if
[
$?
-ne
0
]
;
then
...
...
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