Skip to content

Commit

Permalink
Released version 1.0.0! 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
0x3333 committed Jan 21, 2022
1 parent 9d5bba6 commit fc3234b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Currently, there is no release or version number, so the easiest installation pr

```bash
curl "https://raw.githubusercontent.com/0x3333/backup-rclone/master/backup-rclone" \
> /usr/bin/backup-rclone && chmod +x /usr/bin/backup-rclone
> /usr/bin/backup-rclone && chmod +x /usr/bin/backup-rclone && /usr/bin/backup-rclone --version
```

The `backup-rclone` executable will be available in the `/usr/bin` folder, and is ready to go.
Expand Down
11 changes: 8 additions & 3 deletions backup-rclone
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ from typing import List, Tuple
# Constants
#

# Version
_VERSION = "1.0.0"

# Default Files
_CFG_FILE = "/etc/backup-rclone.conf"
_LOG_FILE = "/var/log/backup-rclone.log"
Expand Down Expand Up @@ -343,7 +346,7 @@ def main():
parser.add_argument("--check", dest="check", action="store_true",
help="Check the configuration file.")

parser.add_argument("-p", "--profile", action="append", dest="profiles", default=[],
parser.add_argument("-p", "--profile", action="append", dest="profile", default=[],
help="Profile to run. Can be specified multiple times to run multiple profiles. \
If not provided, all profiles will be run")

Expand All @@ -352,6 +355,8 @@ def main():
parser.add_argument("-o", "--global-post-exec",
help="Command to be executed after the profile is run")

parser.add_argument("--version", action="version", version="backup-rclone v%s" % _VERSION)

args = parser.parse_args()

#
Expand Down Expand Up @@ -419,12 +424,12 @@ def main():
_exit_code, _, _ = run_command(args.global_pre_exec)
if _exit_code != 0:
logging.error(
"global_pre_exec returned %s. Will not run the profiles." % _exit_code)
"global_pre_exec returned %s. Will run no profiles." % _exit_code)
sys.exit(_EXIT_FINISHED_WITH_ERRORS)

#
# Execute Profiles
exit_code = run(args.profiles)
exit_code = run(args.profile)
if exit_code == 0:
logging.info("backup-rclone finished!")
else:
Expand Down

0 comments on commit fc3234b

Please sign in to comment.