inst_root="$2" ; package="$3" ; shift 3 ;;
remove) remove="1"
inst_root="$2" ; package="$3" ; shift 3 ;;
- dist-install) d_install="1"
+ dist-install) d_install="1" ; package="fake"
inst_root="$2" ; dist_file="$3" ; shift 3 ;;
-v) verbose=1 ; shift 1 ;;
-a) auto_resolve_deps="1" ; shift 1 ;;
tar --use-compress-program=bzip2 \
-xf $bin_dir/$package/$package.tar.bz2 -C $inst_root
elif [ ! -z "$net_addr" ] ; then
- #echo "trying to get package $package via net ..."
+ echo "getting package $package via net ..."
wget $net_addr/hdw-linux/hdw-linux-$hdw_version/binaries/${hdw_arch}-${hdw_arch_opt}/$package/${package}.tar.bz2 > /dev/null 2>&1
- if [ "$?" ] ; then
+ retval=$?
+ if [ "$retval" != "0" ] ; then
echo "package not found at $net_addr, aborting ..."
else
-
+ echo "extracting $package to $inst_root ..."
tar --use-compress-program=bzip2 \
-xf ${package}.tar.bz2 -C $inst_root
rm ${package}.tar.bz2
fi
# merging info/dir file
+ if [ "$pkg" != "00-dirtree" ] ; then
fl_file=`ls -A $inst_root/var/adm/flists/$pkg-[0-9]* | tail -1`
if [ -n "`grep usr/share/info/dir $fl_file`" ] ; then
echo "" >> /tmp/.hdw-get/dir
fi
done
fi
- cp /tmp/.hdw-get/dir $inst_root/usr/share/info/dir
+ fi
+ [ -f /tmp/.hdw-get/dir ] && \
+ cp /tmp/.hdw-get/dir $inst_root/usr/share/info/dir
rm -f /tmp/.hdw-get/dir
# check for runtime deps
#fi
# dist-install
-elif [ "$dist_install" = "1" ] ; then
+elif [ "$d_install" = "1" ] ; then
# check dist file
if [ ! -f $dist_file ] ; then
echo "$dist_file not found, aborting"