-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Add MOVE_DIRECTORY forward model job (#8374)
- 13.0.0
- 13.0.0-rc4
- 13.0.0-rc3
- 13.0.0-rc2
- 13.0.0-rc1
- 13.0.0-rc0
- 12.2.0-rc0
- 12.1.2
- 12.1.1
- 12.1.0
- 12.1.0-b3
- 12.1.0-b2
- 12.1.0-b1
- 12.1.0-b0
- 12.0.0
- 12.0.0-rc7
- 12.0.0-rc6
- 12.0.0-rc5
- 12.0.0-rc4
- 12.0.0-rc3
- 12.0.0-rc2
- 12.0.0-rc1
- 12.0.0-rc0
- 11.2.0-b0
- 11.1.11
- 11.1.10
- 11.1.9
- 11.1.8
- 11.1.7
- 11.1.6
- 11.1.5
- 11.1.4
- 11.1.3
- 11.1.2
- 11.1.1
- 11.1.0
- 11.1.0-b6
- 11.1.0-b5
- 11.1.0-b4
- 11.1.0-b3
- 11.1.0-b2
- 11.1.0-b1
- 11.1.0-b0
- 11.0.8
- 11.0.7
- 11.0.6
- 11.0.5
- 11.0.4
- 11.0.3
- 11.0.2
- 11.0.1
- 11.0.0
- 11.0.0-rc2
- 11.0.0-rc1
- 11.0.0-rc0
- 11.0.0-b1
- 11.0.0-b0
- 10.3.5
- 10.3.4
- 10.3.3
- 10.3.2
- 10.3.1
- 10.3.0
- 10.3.0-rc1
- 10.3.0-rc0
- 10.3.0-b1
- 10.3.0-b0
Showing
7 changed files
with
106 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import shutil | ||
import sys | ||
|
||
|
||
def move_directory(src_dir, target): | ||
""" | ||
Will raise IOError if src_dir is not a folder. | ||
""" | ||
if os.path.isdir(src_dir): | ||
if os.path.exists(target): | ||
shutil.rmtree(target) | ||
shutil.move(src_dir, target) | ||
else: | ||
raise IOError(f"Input argument {src_dir} is not an existing directory") | ||
|
||
|
||
if __name__ == "__main__": | ||
src = sys.argv[1] | ||
target = sys.argv[2] | ||
try: | ||
move_directory(src, target) | ||
except IOError as e: | ||
sys.exit(f"MOVE_DIRECTORY failed with the following error: {e}") |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
INTERNAL FALSE | ||
EXECUTABLE ../../../shell_scripts/move_directory.py |
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
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