forked from ungleich-public/cdist
allow users to check whether an object changed
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
462ed49a74
commit
7a09266abf
3 changed files with 18 additions and 2 deletions
|
|
@ -485,7 +485,7 @@ class Cdist:
|
|||
]
|
||||
for bin in paths:
|
||||
if os.path.isfile(bin):
|
||||
# omit "gen" from gencode and
|
||||
# omit "gen" from gencode and use it for output base
|
||||
outfile=os.path.join(self.object_dir(cdist_object),
|
||||
os.path.basename(bin)[3:])
|
||||
|
||||
|
|
@ -507,6 +507,10 @@ class Cdist:
|
|||
# Add header and make executable - identically to 0o700
|
||||
os.chmod(outfile, stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR)
|
||||
|
||||
# Mark object as changed
|
||||
open(os.path.join(self.object_dir(cdist_object), "changed"), "w").close()
|
||||
|
||||
|
||||
if mode == "code":
|
||||
local_dir = self.object_dir(cdist_object)
|
||||
remote_dir = self.remote_object_dir(cdist_object)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue