babel: tangled files which include shebang lines are now made executable

This commit is contained in:
Eric Schulte 2010-05-25 20:01:20 -06:00
parent 6151c88f10
commit ceeb4681ef
1 changed files with 2 additions and 0 deletions

View File

@ -139,6 +139,8 @@ exported source code blocks by language."
(goto-char (point-max))
(insert content)
(write-region nil nil file-name))))
;; if files contain she-bangs, then make the executable
(when she-bang (set-file-modes file-name ?\755))
;; update counter
(setq block-counter (+ 1 block-counter))
(add-to-list 'path-collector file-name)))))