Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
6
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clewsy
scripts
Commits
ad55cad0
Commit
ad55cad0
authored
Jun 07, 2020
by
clewsy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed error codes.
parent
738dbc5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
bu.sh
bu.sh
+10
-10
No files found.
bu.sh
View file @
ad55cad0
...
...
@@ -20,16 +20,16 @@ BU_LOG_FILE="${HOME}/.log/bu.log"
if
[
!
-d
"
$(
dirname
"
${
BU_LOG_FILE
}
"
)
"
]
;
then
mkdir
--parents
"
$(
dirname
"
${
BU_LOG_FILE
}
"
)
"
;
fi
##########Exit codes
SUCCESS
=
0
## Noice.
BAD_OPTION
=
1
## Incorrect usage.
TOO_MANY_ARGS
## More than one argument was provided.
MISSING_ARG
## Option -f or -d provided but argument was not provided.
BAD_ARG
=
2
## Specified or default file list not readable.
NO_RSYNC
=
3
## rsync not installed.
NO_REM_DIR
=
4
## ssh command to create remote directory failed.
BAD_LIST_FILE
=
5
## List file not identified as ascii text file.
NO_VALID_FILES
## Parsing list file found no valid files to back up.
RSYNC_FAILED
=
6
## rsync command was reached but failed.
SUCCESS
=
0
## Noice.
BAD_OPTION
=
1
## Incorrect usage.
TOO_MANY_ARGS
=
2
## More than one argument was provided.
MISSING_ARG
=
3
## Option -f or -d provided but argument was not provided.
BAD_ARG
=
4
## Specified or default file list not readable.
NO_RSYNC
=
5
## rsync not installed.
NO_REM_DIR
=
6
## ssh command to create remote directory failed.
BAD_LIST_FILE
=
7
## List file not identified as ascii text file.
NO_VALID_FILES
=
8
## Parsing list file found no valid files to back up.
RSYNC_FAILED
=
9
## rsync command was reached but failed.
##########Function to print current date and time. Used for logging.
TIMESTAMP
()
{
echo
-ne
"
$(
date
+%Y-%m-%d
\
%T
)
"
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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