-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding command line option to fix folder content permissions
- Loading branch information
Showing
5 changed files
with
62 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
"""Console script for fcust.""" | ||
import sys | ||
import click | ||
from pathlib import PosixPath | ||
from fcust.fcust import CommonFolder | ||
|
||
|
||
@click.command() | ||
def main(args=None): | ||
"""Console script for fcust.""" | ||
click.echo("Replace this message by putting your code into " "fcust.cli.main") | ||
click.echo("See click documentation at https://click.palletsprojects.com/") | ||
return 0 | ||
@click.argument("folder_path") | ||
def main( | ||
folder_path: str, | ||
help="Path where the common foler is located", | ||
): | ||
fpath = PosixPath(folder_path) | ||
if not fpath.exists(): | ||
raise FileNotFoundError(f"Specified folder {folder_path} does not exist!") | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) # pragma: no cover | ||
# assume common folder itself has been created with proper group and permissions. | ||
click.echo(f"Initiating maintenance on {folder_path}") | ||
cf = CommonFolder(folder_path=fpath) | ||
cf.enforce_permissions() | ||
click.echo("Common folder maintenance completed.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.0.3 | ||
current_version = 0.0.4 | ||
commit = False | ||
tag = False | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters