Permalink
Browse files

Fix rpg-package-install when gem contains empty dirs in lib.

* is not expanded in these cases, leading to installdir trying
to install "/path/to/lib/*" which fails.
  • Loading branch information...
1 parent 78741b6 commit 8f1f43d65dc6a1e7b20e07b40faf0f82db83ba7e @richmeyers richmeyers committed Jan 2, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 rpg-package-install.sh
View
7 rpg-package-install.sh
@@ -51,7 +51,12 @@ installdir () {
mkdir -p "$2"
for file in "$1"/*
do
- if test -f "$file"
+ if ! test -e "$file"
+ then
+ # no files in directory - * was not expanded
+ :
+
+ elif test -f "$file"
then # link dest to source
installfile "$file" "$2/$(basename $file)"
echo "$2/$(basename $file)"

0 comments on commit 8f1f43d

Please sign in to comment.