Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
awit-dbackup
awit-dbackup
Commits
114d194d
Commit
114d194d
authored
Jul 11, 2014
by
Nigel Kukard
Browse files
Check compression program exists
parent
90b994b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
dbackup
View file @
114d194d
...
...
@@ -1065,10 +1065,20 @@ sub backup
}
# Do backup
# If we backing up or restoring, we need to check the compression program
if
(
defined
(
$optctl
{'
backup
'})
||
defined
(
$optctl
{'
restore
'}))
{
# One last check for to make sure the compression program exists
if
(
checkPATH
(
my
$compressProgram
=
"
compress-
"
.
$config
{'
compress
'}))
{
print
(
STDERR
"
ERROR: Compression program '
$compressProgram
' cannot be found in path!
");
exit
1
;
}
}
# Check if we backing up
if
(
defined
(
$optctl
{'
backup
'}))
{
backup
(
$sourceDir
,
$destDir
);
# Or restoring...
}
elsif
(
defined
(
$optctl
{'
restore
'}))
{
restore
(
$sourceDir
,
$destDir
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment