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.
master
nirenjan 2013-10-17 11:59:09 -07:00
parent 5ab3d000a3
commit 3e68eb0970
1 changed files with 5 additions and 1 deletions

View File

@ -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