Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iml-backup
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
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
IML Open Source
iml-backup
Commits
2a260f08
Commit
2a260f08
authored
3 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
show errors on STDERR
parent
8b9bafb9
No related branches found
No related tags found
1 merge request
!27
Eliminate scheduler
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
backup.sh
+2
-2
2 additions, 2 deletions
backup.sh
jobhelper.sh
+3
-3
3 additions, 3 deletions
jobhelper.sh
with
5 additions
and
5 deletions
backup.sh
+
2
−
2
View file @
2a260f08
...
...
@@ -91,7 +91,7 @@ do
echo
"Param: setting to AUTO on duplicity"
echo
"
$2
"
|
grep
"^[1-9][0-9]*[a-zA-Z]$"
2>/dev/null
if
[
$?
-ne
0
]
;
then
echo
"ERROR: the value after
$1
must be a number and a letter (for unit); i.e. 1M for 1 month"
>
&2
echo
"ERROR: the value after
$1
must be a number and a letter (for unit); i.e. 1M for 1 month"
exit
1
else
JOBDEF_TYPE
=
auto
...
...
@@ -112,7 +112,7 @@ do
bStart
=
1
;;
*
)
echo
"ERROR: parameter [
$1
] is unknown"
>
&2
echo
"ERROR: parameter [
$1
] is unknown"
showHelp
exit
1
esac
...
...
This diff is collapsed.
Click to expand it.
jobhelper.sh
+
3
−
3
View file @
2a260f08
...
...
@@ -47,7 +47,7 @@ function j_init(){
if
[
!
-d
"
${
DIR_JOBS
}
"
]
;
then
# mkdir -p ${DIR_JOBS} && echo "INFO: dir created ${DIR_JOBS}"
echo
"ERROR: missing jobs directory. Aborting."
>
&2
echo
"ERROR: missing jobs directory. Aborting."
exit
1
fi
...
...
@@ -169,7 +169,7 @@ function j_getSafename(){
# ------------------------------------------------------------
function
_j_getvar
(){
if
[
!
-r
"
${
1
}
"
]
;
then
echo
"ERROR: cannot read file:
${
1
}
. Abort."
>
&2
echo
"ERROR: cannot read file:
${
1
}
. Abort."
exit
100
fi
grep
"^
${
2
}
\
=
\
"
<
"
${
1
}
"
|
cut
-f
3-
-d
" "
...
...
@@ -373,7 +373,7 @@ function j_requireProcess(){
function
j_requireUser
(){
sUser
=
$(
id
|
cut
-f
2
-d
"("
|
cut
-f
1
-d
")"
)
if
[[
"
$sUser
"
!=
"
$1
"
]]
;
then
echo
"ERROR: user
$1
is reqired."
>
&2
echo
"ERROR: user
$1
is reqired."
exit
5
fi
}
...
...
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