Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
rpg-package-register doesn't leak expr output
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomayko committed Mar 22, 2010
1 parent 2d83d83 commit dd99548
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions rpg-package-register.sh
@@ -1,18 +1,5 @@
#!/bin/sh
# Register a gem in the package database.
#
# PGEMDB
# foo/
# 0.1/
# 0.2/
# bar/
# 1.2/
# 1.3/
# name
# version
# gemspec
# deps
#
# Register a gem in the local package database.
set -e
. rpg-sh-setup

Expand All @@ -30,7 +17,7 @@ test "$1" = '-f' && {
# Under the second synopsis form, we first perform a `rpg-fetch` on the
# `<package>` and `<version>` given and then continue with the resulting
# filename.
if test $# -eq 2 && ! expr -- "$1" : '.*\.gem'
if test $# -eq 2 && ! expr -- "$1" : '.*\.gem' >/dev/null
then
gemfile=$(rpg-fetch "$1" "$2")
set -- "$gemfile"
Expand Down

0 comments on commit dd99548

Please sign in to comment.