mirror of https://github.com/nirenjan/dotfiles.git
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
parent
5ab3d000a3
commit
3e68eb0970
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue