Permalink
Browse files

fix unpacking github archives

  • Loading branch information...
1 parent 025841a commit d8e79e8e85c97d278c60575d1629a07e0e9db56c @mpapis mpapis committed Apr 12, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/internal/shell/vcs/handlers/archive/functions
@@ -80,7 +80,7 @@ Please read 'sm man curl' for instructions how to solve this problem.\n"
(*github.com/*/archive/*.tar.gz)
tar -zxf "${_archive}" 2>&1 | __sm.log.debug vcs -
(( ${pipestatus[1]} == 0 )) || fetch_error extracting_archive_failed
- typeset name_pattern="${_uri#*github.com/}"
+ typeset name_pattern="${_uri#*github.com/*/}"
name_pattern="${name_pattern%archive/*}"
name_pattern="${name_pattern//\//-}"
mv ${name_pattern}*/* .
@@ -105,7 +105,7 @@ Please read 'sm man curl' for instructions how to solve this problem.\n"
(*github.com/*/archive/*.zip)
unzip -q "${_archive}" 2>&1 | __sm.log.debug vcs -
(( ${pipestatus[1]} == 0 )) || fetch_error extracting_archive_failed
- typeset name_pattern="${_uri#*github.com/}"
+ typeset name_pattern="${_uri#*github.com/*/}"
name_pattern="${name_pattern%archive/*}"
name_pattern="${name_pattern//\//-}"
mv ${name_pattern}*/* .

0 comments on commit d8e79e8

Please sign in to comment.