mirror of
https://github.com/helixarch/debtap
synced 2024-11-22 10:20:25 +01:00
Update 3.1
This commit is contained in:
parent
78cba2e122
commit
d93bab1341
22
debtap
22
debtap
|
@ -78,9 +78,17 @@ elif [[ $update == set ]]; then
|
||||||
_arch=arm64
|
_arch=arm64
|
||||||
fi
|
fi
|
||||||
ubuntu_latest_stable_version=`curl -s https://packages.ubuntu.com | grep option | gawk -F '=' '{print $2}' | gawk '{print $1}' | grep -v option | tac | sed -n 3'{p;q;}' | sed s'/\("\|-updated\|-backports\)//g'`
|
ubuntu_latest_stable_version=`curl -s https://packages.ubuntu.com | grep option | gawk -F '=' '{print $2}' | gawk '{print $1}' | grep -v option | tac | sed -n 3'{p;q;}' | sed s'/\("\|-updated\|-backports\)//g'`
|
||||||
curl -C - -f http://ftp.debian.org/debian/dists/sid/main/Contents-$_arch.gz > /var/cache/debtap/debian-packages-files.gz
|
curl -C - -f http://ftp.debian.org/debian/dists/sid/main/Contents-$_arch.gz > /var/cache/debtap/debian-main-packages-files.gz
|
||||||
gzip -df /var/cache/debtap/debian-packages-files.gz
|
gzip -df /var/cache/debtap/debian-main-packages-files.gz
|
||||||
|
curl -C - -f http://ftp.debian.org/debian/dists/sid/non-free/Contents-$_arch.gz > /var/cache/debtap/debian-non-free-packages-files.gz
|
||||||
|
gzip -df /var/cache/debtap/debian-non-free-packages-files.gz
|
||||||
|
curl -C - -f http://ftp.debian.org/debian/dists/sid/contrib/Contents-$_arch.gz > /var/cache/debtap/debian-contrib-packages-files.gz
|
||||||
|
gzip -df /var/cache/debtap/debian-contrib-packages-files.gz
|
||||||
|
if [[ $_arch == i386 ]] || [[ $_arch == amd64 ]]; then
|
||||||
curl -C - -f http://archive.ubuntu.com/ubuntu/dists/$ubuntu_latest_stable_version/Contents-$_arch.gz > /var/cache/debtap/ubuntu-packages-files.gz
|
curl -C - -f http://archive.ubuntu.com/ubuntu/dists/$ubuntu_latest_stable_version/Contents-$_arch.gz > /var/cache/debtap/ubuntu-packages-files.gz
|
||||||
|
else
|
||||||
|
curl -C - -f http://ports.ubuntu.com/ubuntu-ports/dists/$ubuntu_latest_stable_version/Contents-$_arch.gz > /var/cache/debtap/ubuntu-packages-files.gz
|
||||||
|
fi
|
||||||
gzip -df /var/cache/debtap/ubuntu-packages-files.gz
|
gzip -df /var/cache/debtap/ubuntu-packages-files.gz
|
||||||
if [[ $(echo $?) != 0 ]]; then
|
if [[ $(echo $?) != 0 ]]; then
|
||||||
echo -e "${red}Synchronization failed. Exiting...${NC}"; exit 1
|
echo -e "${red}Synchronization failed. Exiting...${NC}"; exit 1
|
||||||
|
@ -545,7 +553,7 @@ echo -e "\n${lightgreen}***${NC} ${bold}Creation of .PKGINFO file in progress. I
|
||||||
packages-names-translator() {
|
packages-names-translator() {
|
||||||
# First method of translating .deb packages names into Arch Linux packages names, more accurate, comparing contents of .deb packages with Arch Linux packages contents
|
# First method of translating .deb packages names into Arch Linux packages names, more accurate, comparing contents of .deb packages with Arch Linux packages contents
|
||||||
for debian_package_name in $(gawk '{print $1}' `ls | grep initial-check-list`); do
|
for debian_package_name in $(gawk '{print $1}' `ls | grep initial-check-list`); do
|
||||||
for debian_package_file in `grep "\/$debian_package_name$" /var/cache/debtap/debian-packages-files | grep 'bin\|opt\|\.so' | gawk '{print $1}' | sed s'/\// /g' | gawk '{print $NF}'`; do
|
for debian_package_file in `grep "\/$debian_package_name$" /var/cache/debtap/debian-main-packages-files /var/cache/debtap/debian-non-free-packages-files /var/cache/debtap/debian-contrib-packages-files | grep 'bin\|opt\|\.so' | gawk '{print $1}' | sed s'/\// /g' | gawk '{print $NF}'`; do
|
||||||
echo $debian_package_file $(grep "^$debian_package_name$\|^$debian_package_name " `ls | grep initial-check-list` | gawk '{print $2}')
|
echo $debian_package_file $(grep "^$debian_package_name$\|^$debian_package_name " `ls | grep initial-check-list` | gawk '{print $2}')
|
||||||
done >> $debian_package_name-tempfile03
|
done >> $debian_package_name-tempfile03
|
||||||
done
|
done
|
||||||
|
@ -553,7 +561,7 @@ done
|
||||||
for i in `ls | grep tempfile03`; do
|
for i in `ls | grep tempfile03`; do
|
||||||
for j in `gawk '{print $1}' $i`; do
|
for j in `gawk '{print $1}' $i`; do
|
||||||
for k in `pkgfile -q $j`; do
|
for k in `pkgfile -q $j`; do
|
||||||
echo $k`head -1 $i | gawk '{print $2$3}'`
|
echo $k`head -1 $i | gawk '{print $2$3}'`,
|
||||||
done
|
done
|
||||||
done >> `echo $i | sed s'/tempfile03/tempfile04/'`
|
done >> `echo $i | sed s'/tempfile03/tempfile04/'`
|
||||||
done
|
done
|
||||||
|
@ -2744,6 +2752,7 @@ if [[ -e dependencies-initial-check-list ]]; then
|
||||||
pkgfile -q "$i" | head -1 >> tempfile15
|
pkgfile -q "$i" | head -1 >> tempfile15
|
||||||
done
|
done
|
||||||
# Removing packages names that are part of base group (if any exist)
|
# Removing packages names that are part of base group (if any exist)
|
||||||
|
touch tempfile15-1
|
||||||
sort -u tempfile15 | grep -v '^$' | while read line; do
|
sort -u tempfile15 | grep -v '^$' | while read line; do
|
||||||
if [[ $(grep -q "^$(echo "$line" | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//')$" /var/cache/debtap/base-packages; echo $?) != 0 ]]; then
|
if [[ $(grep -q "^$(echo "$line" | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//')$" /var/cache/debtap/base-packages; echo $?) != 0 ]]; then
|
||||||
echo "$line" >> tempfile15-1
|
echo "$line" >> tempfile15-1
|
||||||
|
@ -2759,6 +2768,7 @@ sort -u tempfile15 > tempfile16
|
||||||
gawk '{print $1}' tempfile16 | sort -u > tempfile17
|
gawk '{print $1}' tempfile16 | sort -u > tempfile17
|
||||||
|
|
||||||
# Removing packages names that are the same with the name of the package to be converted from translated packages list (if any exist)
|
# Removing packages names that are the same with the name of the package to be converted from translated packages list (if any exist)
|
||||||
|
touch tempfile18
|
||||||
for i in `cat tempfile17`; do
|
for i in `cat tempfile17`; do
|
||||||
if [[ $(echo " $(echo $(grep ^pkgname .PKGINFO | gawk '{print $3}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//'){-svn,-git,-cvs,-bzr,-darcs,-hg,}) " | grep -q " $(echo $i | sed s'/^lib32-\|-multilib$//') "; echo $?) != 0 ]]; then
|
if [[ $(echo " $(echo $(grep ^pkgname .PKGINFO | gawk '{print $3}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//'){-svn,-git,-cvs,-bzr,-darcs,-hg,}) " | grep -q " $(echo $i | sed s'/^lib32-\|-multilib$//') "; echo $?) != 0 ]]; then
|
||||||
echo "$i" >> tempfile18
|
echo "$i" >> tempfile18
|
||||||
|
@ -2766,7 +2776,7 @@ for i in `cat tempfile17`; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $wipeout != set ]]; then
|
if [[ $wipeout != set ]] && [[ $(ls *-tempfile19 &> /dev/null; echo $?) == 0 ]]; then
|
||||||
# Isolating versions from packages
|
# Isolating versions from packages
|
||||||
for i in `ls | grep tempfile19`; do
|
for i in `ls | grep tempfile19`; do
|
||||||
if [[ $(grep -q "=\|>\|<" $i; echo $?) != 0 ]]; then
|
if [[ $(grep -q "=\|>\|<" $i; echo $?) != 0 ]]; then
|
||||||
|
@ -2919,7 +2929,7 @@ if [[ $(grep -q '^Recommends:\|^Suggests:' control; echo $?) == 0 ]]; then
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
rm -rf *tempfile* optional-dependencies-initial-check-list final-check-list
|
rm -rf *tempfile* optional-dependencies-initial-check-list final-check-list
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Moving report files to /tmp/debtap (if any exist)
|
# Moving report files to /tmp/debtap (if any exist)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user