summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2013-05-22 09:50:06 +0100
committerJonathan Maw <jonathan.maw@codethink.co.uk>2013-05-22 09:50:06 +0100
commit295abb023838c7de9c73ac3d619523b8c910835e (patch)
tree35bae94ef0cd3b3570c563f8995d27682e5dae23
parent270936ee338155090133aecb36aac1e2cfb543a4 (diff)
downloadmorphs-295abb023838c7de9c73ac3d619523b8c910835e.tar.gz
Include Lars' suggestions to install-files.configure
-rwxr-xr-xinstall-files.configure5
1 files changed, 3 insertions, 2 deletions
diff --git a/install-files.configure b/install-files.configure
index 94c213d..8097109 100755
--- a/install-files.configure
+++ b/install-files.configure
@@ -81,6 +81,7 @@ class InstallFilesConfigureExtension(cliapp.Application):
else:
os.mkdir(dest_path, mode)
os.chown(dest_path, uid, gid)
+ os.chmod(dest_path, mode)
elif stat.S_ISLNK(mode):
if os.path.lexists(dest_path):
@@ -93,14 +94,14 @@ class InstallFilesConfigureExtension(cliapp.Application):
os.lchown(dest_path, uid, gid)
elif stat.S_ISREG(mode):
- if os.path.exists(dest_path):
+ if os.path.lexists(dest_path):
raise cliapp.AppException('File already exists at %s'
% dest_path)
else:
shutil.copyfile(os.path.join(manifest_root, './' + path),
dest_path)
- os.chmod(dest_path, mode)
os.chown(dest_path, uid, gid)
+ os.chmod(dest_path, mode)
else:
raise cliapp.AppException('Mode given in "%s" is not a file,'