#!/bin/tcsh -f

if("$1" == "") then
  echo usage: $0 "<archive>"
  exit 1
endif

cp $* dar.gif /usr/src/rpm/SOURCES
cp dar.rpm.spec /usr/src/rpm/SPECS

set old_dir = `pwd`
cd /usr/src/rpm/SPECS
rpm -ba --clean --rmsource --nodeps dar.rpm.spec

mv /usr/src/rpm/RPMS/i386/dar* /usr/src/rpm/SRPMS/dar* $old_dir
rm /usr/src/rpm/SPECS/dar.rpm.spec
echo "installer et desinstaller le rpm pour nettoyer completement"
