Skip to content

Commit 0728993

Browse files
author
Matthew Fisher
committed
refactor(builder): simplify sed substitution
The `perl | sed` commands used previously were to remove single quotes from the string. This sed replacement greatly simplifies that logic.
1 parent 2aa99a6 commit 0728993

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

builder/templates/gitreceive

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ case "$1" in
1313
export RECEIVE_FINGERPRINT=$3
1414
# ssh provides the original requested command in $SSH_ORIGINAL_COMMAND
1515
SSH_ORIGINAL_COMMAND="$(echo $SSH_ORIGINAL_COMMAND | sed 's/\///g' )" # remove any '/'s
16-
export RECEIVE_REPO="$(echo $SSH_ORIGINAL_COMMAND | awk '{print $2}' | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g')"
16+
export RECEIVE_REPO="$(echo $SSH_ORIGINAL_COMMAND | awk '{print $2}' | sed -e 's/'\''//g')"
1717
REPO_PATH="$GITHOME/$RECEIVE_REPO"
1818
if [ ! -d $REPO_PATH ]; then
1919
mkdir -p $REPO_PATH

0 commit comments

Comments
 (0)