Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide mv wrapper task #86

Merged
merged 1 commit into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions tasks/mv.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"description": "Wrapper task for mv command",
"parameters": {
"source": {
"type": "String",
"description": "Current path of file"
},
"target": {
"type": "String",
"description": "New path of file"
}
},
"input_method": "environment",
"implementations": [
{"name": "mv.sh"}
]
}
11 changes: 11 additions & 0 deletions tasks/mv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# This task exists as a convenience for users who need predictable sudo
# commands without variance to write into their sudoers rules. The only real
# variable in commands used by peadm is the filename of the PE installer
# tarball. This task can be used in a pre-plan to homogenize calls to sudo.
# Rather than literally calling "mv" with a variable filename, the mv.sh task
# can be called. Inputs come as environment variables so the call doesn't
# change.

mv "$PT_source" "$PT_target"