Skip to main content
deleted 3 characters in body
Source Link
muru
  • 78.1k
  • 16
  • 213
  • 319

It seems to me that you have a quoting error somewhere.

Try using a "here document" to output the script:

    cat -e <<__EOF >"$POST_RECEIVE_DIR"
from, to, branch = ARGF.read.split " "

# 3. Copy files to deploy directory
deploy_to_dir = File.expand_path('$DEPLOY_DIR')
GIT_WORK_TREE="#{deploy_to_dir}" git checkout -f master
puts "DEPLOY: master(#{to}) copied to '#{deploy_to_dir}'"
__EOF

Also, what's with the \rs? Are you trying to write DOS files?

It seems to me that you have a quoting error somewhere.

Try using a "here document" to output the script:

    cat -e <<__EOF >"$POST_RECEIVE_DIR"
from, to, branch = ARGF.read.split " "

# 3. Copy files to deploy directory
deploy_to_dir = File.expand_path('$DEPLOY_DIR')
GIT_WORK_TREE="#{deploy_to_dir}" git checkout -f master
puts "DEPLOY: master(#{to}) copied to '#{deploy_to_dir}'"
__EOF

Also, what's with the \rs? Are you trying to write DOS files?

It seems to me that you have a quoting error somewhere.

Try using a "here document" to output the script:

    cat <<__EOF >"$POST_RECEIVE_DIR"
from, to, branch = ARGF.read.split " "

# 3. Copy files to deploy directory
deploy_to_dir = File.expand_path('$DEPLOY_DIR')
GIT_WORK_TREE="#{deploy_to_dir}" git checkout -f master
puts "DEPLOY: master(#{to}) copied to '#{deploy_to_dir}'"
__EOF

Also, what's with the \rs? Are you trying to write DOS files?

deleted 1 character in body
Source Link

It seems to me that you have a quoting error somewhere.

Try using a "here document" to output the script:

    echocat -e <<__EOF >"$POST_RECEIVE_DIR"
from, to, branch = ARGF.read.split " "

# 3. Copy files to deploy directory
deploy_to_dir = File.expand_path('$DEPLOY_DIR')
GIT_WORK_TREE="#{deploy_to_dir}" git checkout -f master
puts "DEPLOY: master(#{to}) copied to '#{deploy_to_dir}'"
__EOF

Also, what's with the \rs? Are you trying to write DOS files?

It seems to me that you have a quoting error somewhere.

Try using a "here document" to output the script:

    echo -e <<__EOF >"$POST_RECEIVE_DIR"
from, to, branch = ARGF.read.split " "

# 3. Copy files to deploy directory
deploy_to_dir = File.expand_path('$DEPLOY_DIR')
GIT_WORK_TREE="#{deploy_to_dir}" git checkout -f master
puts "DEPLOY: master(#{to}) copied to '#{deploy_to_dir}'"
__EOF

Also, what's with the \rs? Are you trying to write DOS files?

It seems to me that you have a quoting error somewhere.

Try using a "here document" to output the script:

    cat -e <<__EOF >"$POST_RECEIVE_DIR"
from, to, branch = ARGF.read.split " "

# 3. Copy files to deploy directory
deploy_to_dir = File.expand_path('$DEPLOY_DIR')
GIT_WORK_TREE="#{deploy_to_dir}" git checkout -f master
puts "DEPLOY: master(#{to}) copied to '#{deploy_to_dir}'"
__EOF

Also, what's with the \rs? Are you trying to write DOS files?

Source Link

It seems to me that you have a quoting error somewhere.

Try using a "here document" to output the script:

    echo -e <<__EOF >"$POST_RECEIVE_DIR"
from, to, branch = ARGF.read.split " "

# 3. Copy files to deploy directory
deploy_to_dir = File.expand_path('$DEPLOY_DIR')
GIT_WORK_TREE="#{deploy_to_dir}" git checkout -f master
puts "DEPLOY: master(#{to}) copied to '#{deploy_to_dir}'"
__EOF

Also, what's with the \rs? Are you trying to write DOS files?