generated from general-packages/pika-pkg-template
Update fetch.sh
This commit is contained in:
parent
120aa70061
commit
9374209035
28
fetch.sh
28
fetch.sh
@ -28,20 +28,22 @@ for bin_pkg in $BIN_PACKAGE_NAME_LIST
|
|||||||
do
|
do
|
||||||
BIN_VERSION=$(apt show $bin_pkg:$PIKA_BIN_ARCH 2>&1 | grep Version: | head -n1 | cut -f2- -d":" | cut -f2- -d":" | tr -d ' ')
|
BIN_VERSION=$(apt show $bin_pkg:$PIKA_BIN_ARCH 2>&1 | grep Version: | head -n1 | cut -f2- -d":" | cut -f2- -d":" | tr -d ' ')
|
||||||
TARGET_VERSION=$(echo $BIN_VERSION | sed 's/\+b.*//')
|
TARGET_VERSION=$(echo $BIN_VERSION | sed 's/\+b.*//')
|
||||||
apt download -y $bin_pkg:$PIKA_BIN_ARCH || echo "Maybe Error: $bin_pkg doesn't exist in $PIKA_BIN_ARCH" && continue
|
if apt download -y $bin_pkg:$PIKA_BIN_ARCH
|
||||||
ls
|
|
||||||
if [[ $BIN_VERSION == $TARGET_VERSION ]]
|
|
||||||
then
|
then
|
||||||
echo "dbg0"
|
if [[ $BIN_VERSION == $TARGET_VERSION ]]
|
||||||
cp -vf ./*.deb ./output/
|
then
|
||||||
|
cp -vf ./*.deb ./output/
|
||||||
|
else
|
||||||
|
for i in ./*.deb
|
||||||
|
do
|
||||||
|
mkdir $i-tmp
|
||||||
|
dpkg-deb -R $i $i-tmp
|
||||||
|
sed -i "s#$BIN_VERSION#$TARGET_VERSION#g" $i-tmp/DEBIAN/control
|
||||||
|
dpkg-deb -b $i-tmp $i-fixed.deb
|
||||||
|
cp -vf ./*-fixed.deb ./output/
|
||||||
|
done
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
for i in ./*.deb
|
echo "Maybe Error: $bin_pkg doesn't exist in $PIKA_BIN_ARCH"
|
||||||
do
|
|
||||||
mkdir $i-tmp
|
|
||||||
dpkg-deb -R $i $i-tmp
|
|
||||||
sed -i "s#$BIN_VERSION#$TARGET_VERSION#g" $i-tmp/DEBIAN/control
|
|
||||||
dpkg-deb -b $i-tmp $i-fixed.deb
|
|
||||||
cp -vf ./*-fixed.deb ./output/
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user