From 3e68eb097089fa64f0a4f356d8679fe7d3d17d52 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Thu, 17 Oct 2013 11:59:09 -0700 Subject: [PATCH] Add commands to set executable permission on file The deploy script was simply redirecting the contents of the files into the target files, however, they were getting created without executable permissions. Since this script is designed to deploy executables, it is required to set the executable permissions. This cannot be done in the deployment configuration file however, because the script parses all the input files first before extracting the relevant contents. Therefore, if we try to run chmod +x within the file, it would fail because the file would not exist yet (or run deploy twice). This commit also cleans up the formatting when building the command line so that each command is set up on it's own line. --- scripts/deploy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/deploy b/scripts/deploy index a400114..fb16888 100755 --- a/scripts/deploy +++ b/scripts/deploy @@ -160,7 +160,11 @@ file() die 3 "File $file does not exist in version $ver of the repo $DEPLOY_GIT" else debug "Using file $file" - local cmd="cd $DEPLOY_GIT; git show $vercheck:$file > $DEPLOY_TGT/$rename;" + # Build the commands to extract the file and set the + # executable permissions bit in the deployed file. + local cmd="cd $DEPLOY_GIT" + cmd="$cmd; git show $vercheck:$file > $DEPLOY_TGT/$rename" + cmd="$cmd; chmod +x $DEPLOY_TGT/$rename;" DEPLOY_LST="$DEPLOY_LST $cmd" fi