#!/bin/sh

if test $# != 1; then
	echo usage $0 RPM
	exit 1
fi

dummy_dir=/tmp/try_rpm
rpmdb_dir=$dummy_dir/rpmdb
install_dir=$dummy_dir/prefix

rm -rf $dummy_dir
mkdir -p $rpmdb_dir
rpm --nodeps -Uvh --prefix $install_dir --dbpath $rpmdb_dir $1

echo "RPM installed in $install_dir (can be removed safely)"
