Исправление для пакетов без папки

master
Artem Proskurnev 3 years ago
parent 402e78ad97
commit 16088f6e6d
  1. 23
      build.sh

@ -1,4 +1,9 @@
#!/bin/sh #!/bin/sh
mkdir -p ~/RPM/SOURCES
mkdir -p ~/RPM/SPECS
mkdir -p ~/RPM/BUILD
mkdir -p ~/RPM/RPMS
mkdir -p ~/RPM/SRPMS
rm -rf ~/RPM/BUILD/* rm -rf ~/RPM/BUILD/*
rm -rf ~/RPM/RPMS/* rm -rf ~/RPM/RPMS/*
rm -rf ~/RPM/SOURCES/* rm -rf ~/RPM/SOURCES/*
@ -6,11 +11,15 @@ rm -rf ~/RPM/SPECS/*
rm -rf ~/RPM/SRPMS/* rm -rf ~/RPM/SRPMS/*
for i in $(ls *.spec) for i in $(ls *.spec)
do do
v=$(cat $i | grep Version | cut -c 9- | sed 's/ *//g') v=$(cat $i | grep Version | cut -c 9- | sed 's/ *//g')
n=$(basename -s .spec $i) n=$(basename -s .spec $i)
d=$n-$v d=$n-$v
tar -cvf $d.tar $d if [ -d $n ]; then
mv -f $d.tar ~/RPM/SOURCES/ cp -fr $n $d
cp -f $i ~/RPM/SPECS/ tar -cvf $d.tar $d
rpm -ba ~/RPM/SPECS/$i mv -f $d.tar ~/RPM/SOURCES/
rm -rf $d
fi
cp -f $i ~/RPM/SPECS/
rpm -ba ~/RPM/SPECS/$i
done done

Loading…
Cancel
Save