Resolve SC2162: 'read without -r mangles backslashes'
More information: https://github.com/koalaman/shellcheck/wiki/SC2162 http://wiki.bash-hackers.org/commands/builtin/read
This commit is contained in:
@@ -6,7 +6,7 @@ IMPORT_DIR="$2"
|
||||
TARGET_DIR="$3"
|
||||
APPS="$4"
|
||||
|
||||
while read APP; do
|
||||
while read -r APP; do
|
||||
APP_PATH="$TARGET_DIR/$APP";
|
||||
git init --bare $APP_PATH > /dev/null
|
||||
PRERECEIVE_HOOK="$APP_PATH/hooks/pre-receive"
|
||||
|
||||
@@ -33,7 +33,7 @@ case "$1" in
|
||||
git-hook)
|
||||
APP=$2
|
||||
|
||||
while read oldrev newrev refname; do
|
||||
while read -r oldrev newrev refname; do
|
||||
# Only run this script for the master branch. You can remove this
|
||||
# if block if you wish to run it for others as well.
|
||||
if [[ $refname = "refs/heads/master" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user