mirror of
https://github.com/helixarch/debtap
synced 2024-12-23 05:54:52 +01:00
3464 lines
266 KiB
Bash
Executable File
3464 lines
266 KiB
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
# Defining colors and bold letters
|
|
lightgreen='\e[1;32m'
|
|
lightred='\e[1;31m'
|
|
red='\e[0;31m'
|
|
lightblue='\e[1;34m'
|
|
NC='\e[0m'
|
|
bold=`tput bold`
|
|
normal=`tput sgr0`
|
|
|
|
# Help and error messages
|
|
if [[ "$1" == "-q" ]] || [[ "$1" == "--q" ]] || [[ "$1" == "-quiet" ]] || [[ "$1" == "--quiet" ]] || [[ "$1" == "-Q" ]] || [[ "$1" == "--Q" ]] || [[ "$1" == "-Quiet" ]] || [[ "$1" == "--Quiet" ]]; then
|
|
if [[ "$2" == "-h" ]] || [[ "$2" == "--h" ]] || [[ "$2" == "-help" ]] || [[ "$2" == "--help" ]]; then
|
|
echo -e "Syntax: debtap [option] package_filename\n\nOptions:\n\n -h --h -help --help Prints this help message\n -q --q -quiet --quiet Bypass all questions, except for editing metadata file(s)\n -Q --Q -Quiet --Quiet Bypass all questions (not recommended)"; exit 0
|
|
elif [[ "$2" == "" ]]; then
|
|
echo -e "${red}Error: You haven't specified a deb package${NC}\nSyntax: debtap [option] package_filename\n\nOptions:\n\n -h --h -help --help Prints this help message\n -q --q -quiet --quiet Bypass all questions, except for editing metadata file(s)\n -Q --Q -Quiet --Quiet Bypass all questions (not recommended)"; exit 1
|
|
elif [[ $(ls "$2" &> /dev/null; echo $?) != 0 ]]; then
|
|
echo -e "${red}Error: No such file or directory or invalid option${NC}"; exit 1
|
|
elif [[ $(file -b "$2" | grep -q "Debian binary package"; echo $?) != 0 ]]; then
|
|
echo -e "${red}Error: You haven't specified a valid deb package${NC}"; exit 1
|
|
fi
|
|
else
|
|
if [[ "$1" == "-h" ]] || [[ "$1" == "--h" ]] || [[ "$1" == "-help" ]] || [[ "$1" == "--help" ]]; then
|
|
echo -e "Syntax: debtap [option] package_filename\n\nOptions:\n\n -h --h -help --help Prints this help message\n -q --q -quiet --quiet Bypass all questions, except for editing metadata file(s)\n -Q --Q -Quiet --Quiet Bypass all questions (not recommended)"; exit 0
|
|
elif [[ "$1" == "" ]]; then
|
|
echo -e "${red}Error: You haven't specified a deb package${NC}\nSyntax: debtap [option] package_filename\n\nOptions:\n\n -h --h -help --help Prints this help message\n -q --q -quiet --quiet Bypass all questions, except for editing metadata file(s)\n -Q --Q -Quiet --Quiet Bypass all questions (not recommended)"; exit 1
|
|
elif [[ $(ls "$1" &> /dev/null; echo $?) != 0 ]]; then
|
|
echo -e "${red}Error: No such file or directory or invalid option${NC}"; exit 1
|
|
elif [[ $(file -b "$1" | grep -q "Debian binary package"; echo $?) != 0 ]]; then
|
|
echo -e "${red}Error: You haven't specified a valid deb package${NC}"; exit 1
|
|
fi
|
|
fi
|
|
if [[ $(ping -c 1 www.google.com &> /dev/null; echo $?) != 0 ]]; then
|
|
echo -e "${red}Error: You have no internet access, which is necessary for this script to work${NC}"; exit 1
|
|
elif [[ $(ls /var/cache/pkgfile/*.files 2> /dev/null | wc -l) == 0 ]]; then
|
|
echo -e "${red}Error: You must run at least once \"pkgfile -u\" with root privileges (preferably recently), before running this script${NC}"; exit 1
|
|
fi
|
|
|
|
# Defining and creating working directory
|
|
if [[ "$1" == "-q" ]] || [[ "$1" == "--q" ]] || [[ "$1" == "-quiet" ]] || [[ "$1" == "--quiet" ]] || [[ "$1" == "-Q" ]] || [[ "$1" == "--Q" ]] || [[ "$1" == "-Quiet" ]] || [[ "$1" == "--Quiet" ]]; then
|
|
working_directory="`ls "$2" | tr '[:upper:]' '[:lower:]' | sed s'/\.deb//'`-working-directory"
|
|
else
|
|
working_directory="`ls "$1" | tr '[:upper:]' '[:lower:]' | sed s'/\.deb//'`-working-directory"
|
|
fi
|
|
mkdir "$working_directory"
|
|
cd "$working_directory"
|
|
|
|
# Extracting package data and metadata in working directory
|
|
echo -e "${lightgreen}==>${NC} ${bold}Extracting package data...${normal}"
|
|
if [[ "$1" == "-q" ]] || [[ "$1" == "--q" ]] || [[ "$1" == "-quiet" ]] || [[ "$1" == "--quiet" ]] || [[ "$1" == "-Q" ]] || [[ "$1" == "--Q" ]] || [[ "$1" == "-Quiet" ]] || [[ "$1" == "--Quiet" ]]; then
|
|
ar p ../"$2" control.tar.gz | tar xz
|
|
else
|
|
ar p ../"$1" control.tar.gz | tar xz
|
|
fi
|
|
rm -rf $(ls * | grep -v 'control\|preinst\|postinst\|prerm\|postrm\|conffiles')
|
|
if [[ "$1" == "-q" ]] || [[ "$1" == "--q" ]] || [[ "$1" == "-quiet" ]] || [[ "$1" == "--quiet" ]] || [[ "$1" == "-Q" ]] || [[ "$1" == "--Q" ]] || [[ "$1" == "-Quiet" ]] || [[ "$1" == "--Quiet" ]]; then
|
|
data_tar_check=`ar t ../"$2" | grep data`
|
|
if [ $data_tar_check == data.tar.gz ]; then
|
|
ar p ../"$2" data.tar.gz | tar xz
|
|
elif [ $data_tar_check == data.tar.xz ]; then
|
|
ar p ../"$2" data.tar.xz | tar xJ
|
|
elif [ $data_tar_check == data.tar.bz2 ]; then
|
|
ar p ../"$2" data.tar.bz2 | tar xj
|
|
elif [ $data_tar_check == data.tar.lzma ]; then
|
|
ar p ../"$2" data.tar.lzma | tar xJ
|
|
elif [ $data_tar_check == data.tar ]; then
|
|
ar p ../"$2" data.tar | tar x
|
|
fi
|
|
else
|
|
data_tar_check=`ar t ../"$1" | grep data`
|
|
if [ $data_tar_check == data.tar.gz ]; then
|
|
ar p ../"$1" data.tar.gz | tar xz
|
|
elif [ $data_tar_check == data.tar.xz ]; then
|
|
ar p ../"$1" data.tar.xz | tar xJ
|
|
elif [ $data_tar_check == data.tar.bz2 ]; then
|
|
ar p ../"$1" data.tar.bz2 | tar xj
|
|
elif [ $data_tar_check == data.tar.lzma ]; then
|
|
ar p ../"$1" data.tar.lzma | tar xJ
|
|
elif [ $data_tar_check == data.tar ]; then
|
|
ar p ../"$1" data.tar | tar x
|
|
fi
|
|
fi
|
|
|
|
# Fixing possible differences in filesystem hierarchy of the extracted package data, so that it matches Arch Linux filesystem hierarchy
|
|
echo -e "${lightgreen}==>${NC} ${bold}Fixing possible directories structure differencies...${normal}"
|
|
if [ -e usr/games ]; then
|
|
mkdir usr/bin 2> /dev/null; cp -a usr/games/* usr/bin; rm -rf usr/games
|
|
fi
|
|
if [ -e lib ]; then
|
|
mkdir usr 2> /dev/null; cp -a lib usr; rm -rf lib
|
|
fi
|
|
if [ -e lib32 ]; then
|
|
if [ $(grep Architecture: control | grep -q i386; echo $?) -eq 0 ]; then
|
|
mkdir -p usr/lib 2> /dev/null; cp -a lib32/* usr/lib; rm -rf lib32
|
|
else
|
|
mkdir usr 2> /dev/null; cp -a lib32 usr; rm -rf lib32
|
|
fi
|
|
fi
|
|
if [ -e lib64 ]; then
|
|
mkdir -p usr/lib 2> /dev/null; cp -a lib64/* usr/lib; rm -rf lib64
|
|
fi
|
|
if [ -e usr/lib32 ] && [ $(grep Architecture: control | grep -q i386; echo $?) -eq 0 ]; then
|
|
mkdir usr/lib 2> /dev/null; cp -a usr/lib32/* usr/lib; rm -rf usr/lib32
|
|
fi
|
|
if [ -e usr/lib64 ]; then
|
|
mkdir usr/lib 2> /dev/null; cp -a usr/lib64/* usr/lib; rm -rf usr/lib64
|
|
fi
|
|
if [ -e bin ]; then
|
|
mkdir usr 2> /dev/null; cp -a bin usr; rm -rf bin
|
|
fi
|
|
if [ -e sbin ]; then
|
|
mkdir -p usr/bin 2> /dev/null; cp -a sbin/* usr/bin; rm -rf sbin
|
|
fi
|
|
if [ -e usr/sbin ]; then
|
|
mkdir usr/bin 2> /dev/null; cp -a usr/sbin/* usr/bin; rm -rf usr/sbin
|
|
fi
|
|
if [ -e usr/local/games ]; then
|
|
mkdir usr/bin 2> /dev/null; cp -a usr/local/games/* usr/bin; rm -rf usr/local/games
|
|
fi
|
|
if [ -e usr/local/lib32 ] && [ $(grep Architecture: control | grep -q i386; echo $?) -eq 0 ]; then
|
|
mkdir usr/lib 2> /dev/null; cp -a usr/local/lib32/* usr/lib; rm -rf usr/local/lib32
|
|
fi
|
|
if [ -e usr/local/lib64 ]; then
|
|
mkdir usr/lib 2> /dev/null; cp -a usr/local/lib64/* usr/lib; rm -rf usr/local/lib64
|
|
fi
|
|
if [ -e usr/local/sbin ]; then
|
|
mkdir usr/bin 2> /dev/null; cp -a usr/local/sbin/* usr/bin; rm -rf usr/local/sbin
|
|
fi
|
|
if [ -e usr/local ]; then
|
|
cp -a usr/local/* usr; rm -rf usr/local
|
|
fi
|
|
if [ -e usr/share/applications ]; then
|
|
for i in usr/share/applications/*.desktop; do
|
|
sed -i -e s'/Exec=\/bin\//Exec=\/usr\/bin\//g' -e s'/Exec=\/sbin\//Exec=\/usr\/bin\//g' -e s'/Exec=\/usr\/sbin\//Exec=\/usr\/bin\//g' -e s'/Exec=\/usr\/games\//Exec=\/usr\/bin\//g' -e s'/Exec=\/usr\/local\/bin\//Exec=\/usr\/bin\//g' -e s'/Exec=\/usr\/local\/sbin\//Exec=\/usr\/bin\//g' -e s'/Exec=\/usr\/local\/games\//Exec=\/usr\/bin\//g' "$i" 2> /dev/null
|
|
done
|
|
fi
|
|
|
|
# Generating .PKGINFO file
|
|
echo -e "${lightgreen}==>${NC} ${bold}Generating .PKGINFO file...${normal}"
|
|
|
|
# Generating pkgname field
|
|
for i in {git,bzr,darcs,hg}; do
|
|
if [ $(grep ^Version: control | gawk '{print $2}' | grep -q $i; echo $?) -eq 0 ]; then
|
|
echo "pkgname = `grep Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]'`"-$i | sed s"/-$i-$i/-$i/" > .PKGINFO
|
|
fi
|
|
done
|
|
if [ $(grep ^Version: control | gawk '{print $2}' | grep -q svn; echo $?) -eq 0 ]; then
|
|
echo "pkgname = `grep Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]'`"-svn | sed s'/-svn-svn/-svn/' > .PKGINFO
|
|
fi
|
|
for i in {cvs,CVS}; do
|
|
if [ $(grep ^Version: control | gawk '{print $2}' | grep -q $i; echo $?) -eq 0 ]; then
|
|
echo "pkgname = `grep Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]'`"-cvs | sed s'/-cvs-cvs/-cvs/' > .PKGINFO
|
|
fi
|
|
done
|
|
if [ $(grep ^Version: control | gawk '{print $2}' | grep -q "svn\|git\|cvs\|CVS\|bzr\|darcs\|hg"; echo $?) -ne 0 ]; then
|
|
echo "pkgname = `grep Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]'`" | sed s'/demo/-demo/' | sed s'/trial/-trial/' | sed s'/--/-/' | sed 's/^-\(.*\)/\1/' > .PKGINFO
|
|
fi
|
|
|
|
# Generating pkgver field
|
|
version=$(grep ^Version: control | gawk '{print $2}' | sed -e s'/[+~]/-/g' -e s'/[-._]alpha/alpha/' -e s'/[-._]beta/beta/' -e s'/[-._]pre/pre/' -e s'/[-._]rc/rc/' -e s'/[-._]dfsg/dfsg/' | gawk -F 'dev' '{print $1}' | sed -e s'/-\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+\.[0-9]\+//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]*[a-z]*[0-9]*//g' -e s'/--/-/g' -e s'/\.\././g' | sed s'/\.$//')
|
|
for i in {git,bzr,darcs,hg}; do
|
|
if [ $(echo $version | grep -q $i; echo $?) -eq 0 ]; then
|
|
echo "pkgver = `echo $version | gawk -F "$i" '{print $2}' | gawk -F '-' '{print $1}'`"-1 >> .PKGINFO;
|
|
fi
|
|
done
|
|
for i in {svn.r,svnr}; do
|
|
if [ $(echo $version | grep -q $i; echo $?) -eq 0 ]; then
|
|
echo "pkgver = r`echo $version | gawk -F "$i" '{print $2}' | gawk -F '-' '{print $1}'`"-1 >> .PKGINFO;
|
|
fi
|
|
done
|
|
if [ $(echo $version | grep -q svn; echo $?) -eq 0 ] && [ $(echo $version | grep -q "svn\.r\|svnr"; echo $?) -ne 0 ]; then
|
|
echo "pkgver = `echo $version | gawk -F 'svn' '{print $2}' | gawk -F '-' '{print $1}'`"-1 >> .PKGINFO;
|
|
fi
|
|
for i in {cvs,CVS}; do
|
|
if [ $(echo $version | grep -q $i; echo $?) -eq 0 ]; then
|
|
echo "pkgver = `echo $version | sed -e s"/[-.]$i/ /g" -e s"/$i/ /g" -e s"/-/ /g" | gawk '{print $2}'`"-1 >> .PKGINFO;
|
|
fi
|
|
done
|
|
if [ $(echo $version | grep -q "svn\|git\|cvs\|CVS\|bzr\|darcs\|hg"; echo $?) -ne 0 ]; then
|
|
echo "pkgver = `echo $version | gawk -F '-[0-9]' '{print $1}' | sed s'/-/./'`"-1 >> .PKGINFO;
|
|
fi
|
|
|
|
# Generating pkgdesc field
|
|
if [ $(echo `grep -v ":\| \." control` | grep -iq "`grep Description: control | sed s'/Description: //' | sed s'/\.//'`"; echo $?) -eq 0 ]; then
|
|
description=$(echo $(echo "`grep -v ":\| \." control`") | sed s'/^\s*./\U&\E/g' | sed s'/\(\. \|\! \|\? \)\s*./\U&\E/g')
|
|
else
|
|
description=$(echo $(echo "`grep Description: control | sed s'/Description: //' | sed 's/.*/\u&/'`" | sed s'/\.//'). `grep -v ":\| \." control` | sed s'/^\s*./\U&\E/g' | sed s'/\(\. \|\! \|\? \)\s*./\U&\E/g')
|
|
fi
|
|
echo "pkgdesc = $description" >> .PKGINFO
|
|
|
|
# Generating url field
|
|
echo "url = `grep Homepage: control | gawk '{print $2}'`" | sed s'/\/$//' >> .PKGINFO
|
|
|
|
# Generating builddate (which is actually packaging date) field
|
|
echo "builddate = `date -u "+%s"`" >> .PKGINFO
|
|
|
|
# Generating packager field
|
|
if [[ "$1" == "-q" ]] || [[ "$1" == "--q" ]] || [[ "$1" == "-quiet" ]] || [[ "$1" == "--quiet" ]] || [[ "$1" == "-Q" ]] || [[ "$1" == "--Q" ]] || [[ "$1" == "-Quiet" ]] || [[ "$1" == "--Quiet" ]]; then
|
|
echo "packager = Unknown Packager" >> .PKGINFO
|
|
else
|
|
echo -e "\n${lightblue}::${NC} Enter Packager name:"
|
|
read packager_name
|
|
echo "packager = $packager_name" >> .PKGINFO
|
|
fi
|
|
|
|
# Generating arch field
|
|
echo "arch = `grep Architecture: control | gawk '{print $2}' | sed -e s'/i386/i686/' -e s'/amd64/x86_64/' -e s'/all/any/'`" >> .PKGINFO
|
|
|
|
# Generating size field
|
|
if [ -e preinst ]; then
|
|
preinst_size=$(ls -l | grep preinst | gawk '{print $5}');
|
|
else
|
|
preinst_size=0;
|
|
fi
|
|
if [ -e postinst ]; then
|
|
postinst_size=$(ls -l | grep postinst | gawk '{print $5}');
|
|
else
|
|
postinst_size=0;
|
|
fi
|
|
if [ -e prerm ]; then
|
|
prerm_size=$(ls -l | grep prerm | gawk '{print $5}');
|
|
else
|
|
prerm_size=0;
|
|
fi
|
|
if [ -e postrm ]; then
|
|
postrm_size=$(ls -l | grep postrm | gawk '{print $5}');
|
|
else
|
|
postrm_size=0;
|
|
fi
|
|
if [ -e conffiles ]; then
|
|
conffiles_size=$(ls -l | grep conffiles | gawk '{print $5}');
|
|
else
|
|
conffiles_size=0;
|
|
fi
|
|
echo "size =" $(expr `du -sb | tr -d " ."` - `ls -l | grep control | gawk '{print $5}'` - $preinst_size - $postinst_size - $prerm_size - $postrm_size - $conffiles_size - `ls -la | grep .PKGINFO | gawk '{print $5}'` - 4096) >> .PKGINFO
|
|
|
|
# Generating license field
|
|
if [[ "$1" == "-q" ]] || [[ "$1" == "--q" ]] || [[ "$1" == "-quiet" ]] || [[ "$1" == "--quiet" ]] || [[ "$1" == "-Q" ]] || [[ "$1" == "--Q" ]] || [[ "$1" == "-Quiet" ]] || [[ "$1" == "--Quiet" ]]; then
|
|
echo "license = custom" >> .PKGINFO
|
|
else
|
|
echo -e "\n${lightblue}::${NC} Enter package license (you can enter multiple licenses comma seperated):"
|
|
read package_license
|
|
for i in `echo "$package_license" | sed -e s'/ /__/g' -e s'/,/ /g'`; do
|
|
license+=($i)
|
|
done
|
|
for (( i=0; i<$(echo ${#license[@]}); i=i+1 )); do license[$i]=$(echo ${license[$i]} | sed s'/__/ /g'); done
|
|
printf '%s\n' "${license[@]}" | while read line; do echo "license = $line" >> .PKGINFO ; done
|
|
fi
|
|
|
|
# The packages names translator function
|
|
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
|
|
for debian_package_name in $(gawk '{print $1}' `ls | grep initial-check-list`); do
|
|
for debian_package_file in `curl -s https://packages.debian.org/sid/all/$debian_package_name/filelist | sed -n '/pfilelist/,/<\/pre><\/div>/p' | sed s'/<div id="pfilelist"><pre>//' | sed -n '/<\/pre><\/div>/!p' | sed s'/\// /'g | grep 'bin\|opt\|\.so' | gawk '{print $NF}'`; do
|
|
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
|
|
|
|
for i in `ls | grep tempfile03`; do
|
|
for j in `gawk '{print $1}' $i`; do
|
|
for k in `pkgfile $j | gawk -F '/' '{print $2}'`; do
|
|
echo $k`head -1 $i | gawk '{print $2$3}'`;
|
|
done;
|
|
done >> `echo $i | sed s'/tempfile03/tempfile04/'`;
|
|
done
|
|
|
|
touch tempfile05
|
|
for debian_package_name in $(gawk '{print $1}' `ls | grep initial-check-list`); do
|
|
grep -q "^$debian_package_name$" tempfile05 || echo $debian_package_name >> tempfile05;
|
|
done
|
|
|
|
for i in $(for j in `cat tempfile05`; do echo $j-tempfile04; done); do
|
|
k=`sort $i | uniq -c | gawk '{print $1}' | sort -n | tail -1`
|
|
if [ $(sort $i | uniq -c | gawk '{print $1}' | sort -n | grep "^$k$" | wc -l) -ge 2 ]; then
|
|
for l in `cat $i`; do
|
|
for m in $(sort $i | uniq -c | gawk '{print $1,$2}' | sort -n | grep "^$k " | gawk '{print $2}'); do
|
|
echo $l | grep "^$m$";
|
|
done;
|
|
done | head -1 >> tempfile06;
|
|
elif [ $(sort $i | uniq -c | gawk '{print $1}' | sort -n | grep "^$k$" | wc -l) -eq 1 ]; then
|
|
sort $i | uniq -c | gawk '{print $1,$2}' | sort -n | grep "^$k " | gawk '{print $2}' >> tempfile06;
|
|
else
|
|
echo >> tempfile06;
|
|
fi;
|
|
done
|
|
|
|
cat tempfile06 | sed s'/=/ = /g' | sed s'/>/ > /g' | sed s'/</ < /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib$\|^lib32-//g' > tempfile07
|
|
|
|
cat tempfile07 | while read line; do
|
|
if [ $(echo "$line" | wc -w) -eq 0 ]; then
|
|
echo >> final-check-list;
|
|
elif [ $(echo "$line" | wc -w) -eq 1 ] || [ $(echo "$line" | wc -w) -eq 3 ]; then
|
|
echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}'`" >> final-check-list;
|
|
elif [ $(echo "$line" | wc -w) -eq 5 ]; then
|
|
echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}'`" >> final-check-list;
|
|
echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $4}'` `echo "$line" | gawk '{print $5}'`" >> final-check-list;
|
|
fi
|
|
done
|
|
|
|
for i in $(eval echo {1..$(cat `ls | grep initial-check-list` | wc -l)}); do
|
|
if [[ $(sed -n ""$i"{p;q;}" final-check-list | gawk '{print $1}') == "" ]]; then
|
|
echo $(sed -n ""$i"{p;q;}" `ls | grep initial-check-list`) >> untranslated
|
|
echo $(sed -n ""$i"{p;q;}" `ls | grep initial-check-list` | gawk '{print $1}') >> untranslated-names-only
|
|
elif [[ $(echo " $(echo $(grep pkgname .PKGINFO | gawk '{print $3}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//'){-svn,-git,-cvs,-bzr,-darcs,-hg,}) " | grep -q " $(sed -n ""$i"{p;q;}" final-check-list | gawk '{print $1}') "; echo $?) == 0 ]]; then
|
|
echo $(sed -n ""$i"{p;q;}" `ls | grep initial-check-list` | sed s'/ //') >> missing-files
|
|
fi
|
|
done
|
|
|
|
# Second method for translating remaining untranslated .deb packages names into Arch Linux packages names, same as first method, but searches in Ubuntu website for packages contents instead of Debian website
|
|
if [ -e untranslated-names-only ]; then
|
|
ubuntu_latest_development_version=`curl -s http://packages.ubuntu.com | grep option | gawk -F '=' '{print $2}' | gawk '{print $1}' | grep -v option | tac | sed -n 2'{p;q;}' | sed s'/\("\|-updated\|-backports\)//g'`
|
|
|
|
for ubuntu_package_name in $(sort -u untranslated-names-only); do
|
|
for ubuntu_package_file in `curl -s http://packages.ubuntu.com/$ubuntu_latest_development_version/all/$ubuntu_package_name/filelist | sed -n '/pfilelist/,/<\/pre><\/div>/p' | sed s'/<div id="pfilelist"><pre>//' | sed -n '/<\/pre><\/div>/!p' | sed s'/\// /'g | grep 'bin\|opt\|\.so' | gawk '{print $NF}'`; do
|
|
echo $ubuntu_package_file $(grep "^$ubuntu_package_name$\|^$ubuntu_package_name " untranslated | gawk '{print $2}');
|
|
done >> $ubuntu_package_name-tempfile08;
|
|
done
|
|
|
|
for i in `ls | grep tempfile08`; do
|
|
for j in `gawk '{print $1}' $i`; do
|
|
for k in `pkgfile $j | gawk -F '/' '{print $2}'`; do
|
|
echo $k`head -1 $i | gawk '{print $2$3}'`;
|
|
done;
|
|
done >> `echo $i | sed s'/tempfile08/tempfile09/'`;
|
|
done
|
|
|
|
touch tempfile10
|
|
for ubuntu_package_name in $(sort -u untranslated-names-only); do
|
|
grep -q "^$ubuntu_package_name$" tempfile10 || echo $ubuntu_package_name >> tempfile10;
|
|
done
|
|
|
|
for i in $(for j in `cat tempfile10`; do echo $j-tempfile09; done); do
|
|
k=`sort $i | uniq -c | gawk '{print $1}' | sort -n | tail -1`
|
|
if [ $(sort $i | uniq -c | gawk '{print $1}' | sort -n | grep "^$k$" | wc -l) -ge 2 ]; then
|
|
for l in `cat $i`; do
|
|
for m in $(sort $i | uniq -c | gawk '{print $1,$2}' | sort -n | grep "^$k " | gawk '{print $2}'); do
|
|
echo $l | grep "^$m$";
|
|
done;
|
|
done | head -1 >> tempfile11;
|
|
elif [ $(sort $i | uniq -c | gawk '{print $1}' | sort -n | grep "^$k$" | wc -l) -eq 1 ]; then
|
|
sort $i | uniq -c | gawk '{print $1,$2}' | sort -n | grep "^$k " | gawk '{print $2}' >> tempfile11;
|
|
else
|
|
echo >> tempfile11;
|
|
fi;
|
|
done
|
|
|
|
cat tempfile11 | sed s'/=/ = /g' | sed s'/>/ > /g' | sed s'/</ < /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib$\|^lib32-//g' > tempfile12
|
|
|
|
cat tempfile12 | while read line; do
|
|
if [ $(echo "$line" | wc -w) -eq 0 ]; then
|
|
echo >> final-check-list;
|
|
elif [ $(echo "$line" | wc -w) -eq 1 ] || [ $(echo "$line" | wc -w) -eq 3 ]; then
|
|
echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}'`" >> final-check-list;
|
|
elif [ $(echo "$line" | wc -w) -eq 5 ]; then
|
|
echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}'`" >> final-check-list;
|
|
echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $4}'` `echo "$line" | gawk '{print $5}'`" >> final-check-list;
|
|
fi
|
|
done
|
|
|
|
for i in $(eval echo {1..$(cat untranslated | wc -l)}); do
|
|
if [[ $(tac final-check-list | sed -n ""$i"{p;q;}" | gawk '{print $1}') == "" ]]; then
|
|
echo $(tac untranslated | sed -n ""$i"{p;q;}") >> new-untranslated
|
|
echo $(tac untranslated | sed -n ""$i"{p;q;}" | gawk '{print $1}') >> new-untranslated-names-only
|
|
elif [[ $(echo " $(echo $(grep pkgname .PKGINFO | gawk '{print $3}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//'){-svn,-git,-cvs,-bzr,-darcs,-hg,}) " | grep -q " $(tac final-check-list | sed -n ""$i"{p;q;}" | gawk '{print $1}') "; echo $?) == 0 ]]; then
|
|
echo $(tac untranslated | sed -n ""$i"{p;q;}" | sed s'/ //') >> missing-files
|
|
fi
|
|
done
|
|
|
|
rm -rf untranslated untranslated-names-only
|
|
fi
|
|
|
|
# Third method of translating remaining untranslated .deb packages names into Arch Linux packages names, less accurate, comparing .deb packages names with Arch Linux packages names
|
|
if [ -e new-untranslated-names-only ]; then
|
|
for i in $(sort -u new-untranslated-names-only | grep -v python-support); do
|
|
|
|
j=$(echo "$i" | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//')
|
|
|
|
if [ ! -e virtual-packages ]; then
|
|
echo 'aircrack-ng-scripts
|
|
alsa-tools-emu10k1
|
|
alsa-tools-ice1712
|
|
antigrain
|
|
antlr
|
|
arpack-ng
|
|
audacious-player
|
|
aumix-gtk
|
|
avidemux
|
|
awk
|
|
beanshell
|
|
bluez-hcidump
|
|
bsh
|
|
btrfs-progs-unstable
|
|
cairo-xcb
|
|
cheetah
|
|
cl-asdf
|
|
claws
|
|
common-lisp
|
|
cron
|
|
dbus-core
|
|
dbus-python
|
|
dchroot
|
|
d-compiler
|
|
devmon
|
|
dhcp-client
|
|
digest-hmac
|
|
digest-nilsimsa
|
|
digest-sha1
|
|
dns-server
|
|
docutils
|
|
doublecmd
|
|
d-runtime
|
|
d-stdlib
|
|
eigen3
|
|
eject
|
|
emacs-w3m
|
|
enblend
|
|
enlightenment17
|
|
eric5
|
|
fam
|
|
fcitx-qt
|
|
ffado
|
|
firebug
|
|
flake8-python2
|
|
flake8-python3
|
|
flashplayer
|
|
fonttools
|
|
font-util
|
|
foomatic-db-hpijs
|
|
foomatic-filters
|
|
gambas3-gb-gui
|
|
gcc-avr
|
|
gdisk
|
|
gearman
|
|
gimp-mathmap
|
|
girara-common
|
|
girara-gtk3
|
|
git-core
|
|
glut
|
|
gnupg2
|
|
go-openoffice
|
|
grmlzshrc
|
|
grub-bios
|
|
grub-common
|
|
grub-efi-i386
|
|
grub-emu
|
|
gst-ffmpeg
|
|
gtk2hs-cairo
|
|
gtk2hs-glib
|
|
gtk2hs-gtk
|
|
gtk2hs-pango
|
|
gtk-xfce-engine
|
|
guitarix
|
|
gummiboot-efi
|
|
gx_head
|
|
hamster-applet
|
|
haskell-array
|
|
haskell-base
|
|
haskell-binary
|
|
haskell-bin-package-db
|
|
haskell-bytestring
|
|
haskell-cabal
|
|
haskell-containers
|
|
haskell-deepseq
|
|
haskell-directory
|
|
haskell-filepath
|
|
haskell-ghc-prim
|
|
haskell-gtk2hs-buildtools
|
|
haskell-haskell2010
|
|
haskell-haskell98
|
|
haskell-hoopl
|
|
haskell-hpc
|
|
haskell-integer-gmp
|
|
haskell-old-locale
|
|
haskell-old-time
|
|
haskell-pretty
|
|
haskell-process
|
|
haskell-template-haskell
|
|
haskell-time
|
|
haskell-transformers
|
|
haskell-unix
|
|
heirloom-mailx
|
|
howl
|
|
html-tagset
|
|
httplib2
|
|
hubbub
|
|
imap-server
|
|
inputattach
|
|
iproute
|
|
ipython3
|
|
ircd
|
|
jack-audio-connection-kit
|
|
jackdbus
|
|
jackdmp
|
|
jackmp
|
|
jam
|
|
java-environment
|
|
java-runtime
|
|
java-runtime-headless
|
|
java-web-start
|
|
java-xerces2
|
|
jenkins-ci
|
|
joschy
|
|
joystick
|
|
kactivities
|
|
kdeplasma-addons-dataengines
|
|
kernel26
|
|
kernel26-docs
|
|
kernel26-grsec
|
|
kernel26-grsec-docs
|
|
kernel26-grsec-headers
|
|
kernel26-headers
|
|
kernel26-lts
|
|
kernel26-lts-docs
|
|
kernel26-lts-headers
|
|
kernel26-manpages
|
|
khrplatform-devel
|
|
kpackagekit
|
|
kpathsea
|
|
lancelot
|
|
lcdf-typetools
|
|
libao-pulse
|
|
libarchive.so
|
|
libblkid.so
|
|
libcurl.so
|
|
libdjvu
|
|
libdts
|
|
libefivar
|
|
libegl
|
|
libelf
|
|
libextl
|
|
libgbm
|
|
libglapi
|
|
libgles
|
|
libgudev-1.0.so
|
|
libjpeg
|
|
libkmod.so
|
|
libmount.so
|
|
libmysqlclient
|
|
liborigin
|
|
libprofiler.so
|
|
libreoffice-extension-pdfimport
|
|
libreoffice-extension-presenter-screen
|
|
libreoffice-extension-report-builder
|
|
libreoffice-extension-scripting-python
|
|
libreoffice-langpack
|
|
libreoffice-scripting-beanshell
|
|
libreoffice-scripting-javascript
|
|
librime-data
|
|
libsigc++2.0
|
|
libsigc++2.0-docs
|
|
libsoup-gnome
|
|
libssh2.so
|
|
libsystemd-daemon.so
|
|
libsystemd-id128.so
|
|
libsystemd-journal.so
|
|
libsystemd-login.so
|
|
libsystemd.so
|
|
libtcmalloc_and_profiler.so
|
|
libtcmalloc_debug.so
|
|
libtcmalloc_minimal_debug.so
|
|
libtcmalloc_minimal.so
|
|
libtcmalloc.so
|
|
libtu
|
|
libudev.so
|
|
libusbx
|
|
libuuid.so
|
|
libv4l
|
|
libvisual-projectm
|
|
libwebkit
|
|
libwebkit3
|
|
libxml++2
|
|
lightdm-gtk-greeter
|
|
links-g
|
|
lmms-extras
|
|
logger
|
|
lv2core
|
|
lxshortcut
|
|
mailx
|
|
mailx-heirloom
|
|
man
|
|
mate-calc
|
|
mate-document-viewer
|
|
mate-file-archiver
|
|
mate-file-manager
|
|
mate-image-viewer
|
|
mate-media
|
|
mate-menu-editor
|
|
mate-settings-daemon
|
|
mate-text-editor
|
|
mate-window-manager
|
|
mdnsresponder
|
|
mkvtoolnix
|
|
module-init-tools
|
|
monodoc
|
|
mpeg2dec
|
|
mysql
|
|
mysql-clients
|
|
mythes
|
|
netcat
|
|
net-ssleay
|
|
nodejs-node-gyp
|
|
nss-myhostname
|
|
ntfsprogs
|
|
openoffice-af
|
|
openoffice-am
|
|
openoffice-ar
|
|
openoffice-as
|
|
openoffice-ast
|
|
openoffice-be
|
|
openoffice-bg
|
|
openoffice-bn
|
|
openoffice-bn-IN
|
|
openoffice-bo
|
|
openoffice-br
|
|
openoffice-brx
|
|
openoffice-bs
|
|
openoffice-ca
|
|
openoffice-ca-valencia
|
|
openoffice-cs
|
|
openoffice-cy
|
|
openoffice-da
|
|
openoffice-de
|
|
openoffice-dgo
|
|
openoffice-dz
|
|
openoffice-el
|
|
openoffice-en-GB
|
|
openoffice-en-US
|
|
openoffice-en-ZA
|
|
openoffice-eo
|
|
openoffice-es
|
|
openoffice-et
|
|
openoffice-eu
|
|
openoffice-fa
|
|
openoffice-fi
|
|
openoffice-fr
|
|
openoffice-ga
|
|
openoffice-gd
|
|
openoffice-gl
|
|
openoffice-gu
|
|
openoffice-he
|
|
openoffice-hi
|
|
openoffice-hr
|
|
openoffice-hu
|
|
openoffice-id
|
|
openoffice-is
|
|
openoffice-it
|
|
openoffice-ja
|
|
openoffice-ka
|
|
openoffice-kk
|
|
openoffice-km
|
|
openoffice-kmr-Latn
|
|
openoffice-kn
|
|
openoffice-ko
|
|
openoffice-kok
|
|
openoffice-ks
|
|
openoffice-lb
|
|
openoffice-lo
|
|
openoffice-lt
|
|
openoffice-lv
|
|
openoffice-mai
|
|
openoffice-mk
|
|
openoffice-ml
|
|
openoffice-mn
|
|
openoffice-mni
|
|
openoffice-mr
|
|
openoffice-my
|
|
openoffice-nb
|
|
openoffice-ne
|
|
openoffice-nl
|
|
openoffice-nn
|
|
openoffice-nr
|
|
openoffice-nso
|
|
openoffice-oc
|
|
openoffice-om
|
|
openoffice-or
|
|
openoffice-pa-IN
|
|
openoffice-pl
|
|
openoffice-pt
|
|
openoffice-pt-BR
|
|
openoffice-ro
|
|
openoffice-ru
|
|
openoffice-rw
|
|
openoffice-sa-IN
|
|
openoffice-sat
|
|
openoffice-sd
|
|
openoffice-si
|
|
openoffice-sid
|
|
openoffice-sk
|
|
openoffice-sl
|
|
openoffice-sq
|
|
openoffice-sr
|
|
openoffice-sr-Latn
|
|
openoffice-ss
|
|
openoffice-st
|
|
openoffice-sv
|
|
openoffice-sw-TZ
|
|
openoffice-ta
|
|
openoffice-te
|
|
openoffice-tg
|
|
openoffice-th
|
|
openoffice-tn
|
|
openoffice-tr
|
|
openoffice-ts
|
|
openoffice-tt
|
|
openoffice-ug
|
|
openoffice-uk
|
|
openoffice-uz
|
|
openoffice-ve
|
|
openoffice-vi
|
|
openoffice-xh
|
|
openoffice-zh-CN
|
|
openoffice-zh-TW
|
|
openoffice-zu
|
|
osmesa
|
|
pacman-contrib
|
|
pdfjam
|
|
pdflib
|
|
pdns
|
|
pdns-ldap
|
|
pdns-mysql
|
|
pdns-pgsql
|
|
pdns-recursor
|
|
pdns-sqlite
|
|
pep8-python2
|
|
pep8-python3
|
|
perl-apache-soap
|
|
perl-apache-xmlrpc-lite
|
|
perl-archive-tar
|
|
perl-attribute-handlers
|
|
perl-autodie
|
|
perl-autoloader
|
|
perl-autouse
|
|
perl-base
|
|
perl-b-debug
|
|
perl-bignum
|
|
perl-carp
|
|
perl-cgi
|
|
perl-class-accessor-fast
|
|
perl-class-accessor-faster
|
|
perl-compress-raw-bzip2
|
|
perl-compress-raw-zlib
|
|
perl-config-perl-v
|
|
perl-constant
|
|
perl-cpan
|
|
perl-cpan-meta
|
|
perl-cpan-meta-requirements
|
|
perl-cpan-meta-yaml
|
|
perl-db_file
|
|
perl-devel-ppport
|
|
perl-devel-selfstubber
|
|
perl-device-gsm-charset
|
|
perl-device-gsm-networks
|
|
perl-device-gsm-pdu
|
|
perl-device-modem-log-file
|
|
perl-device-modem-log-syslog
|
|
perl-device-modem-usrobotics
|
|
perl-digest
|
|
perl-digest-md5
|
|
perl-digest-sha
|
|
perl-dumpvalue
|
|
perl-email-mime-creator
|
|
perl-email-mime-modifier
|
|
perl-email-simple-creator
|
|
perl-encode
|
|
perl-encoding-warnings
|
|
perl-env
|
|
perl-exiftool
|
|
perl-experimental
|
|
perl-exporter
|
|
perl-extutils-cbuilder
|
|
perl-extutils-command
|
|
perl-extutils-constant
|
|
perl-extutils-install
|
|
perl-extutils-makemaker
|
|
perl-extutils-manifest
|
|
perl-extutils-parsexs
|
|
perl-file-fetch
|
|
perl-file-path
|
|
perl-file-temp
|
|
perl-filter-simple
|
|
perl-filter-util-call
|
|
perl-getopt-long
|
|
perl-http-tiny
|
|
perl-i18n-collate
|
|
perl-i18n-langtags
|
|
perl-if
|
|
perl-io
|
|
perl-io-compress
|
|
perl-io-sessiondata
|
|
perl-io-sessionset
|
|
perl-io-socket-ip
|
|
perl-io-zlib
|
|
perl-ipc-cmd
|
|
perl-ipc-sysv
|
|
perl-json-pp
|
|
perl-lib
|
|
perl-libnet
|
|
perl-libxml
|
|
perl-locale-codes
|
|
perl-locale-maketext
|
|
perl-locale-maketext-simple
|
|
perl-math-bigint
|
|
perl-math-bigint-fastcalc
|
|
perl-math-bigrat
|
|
perl-math-complex
|
|
perl-memoize
|
|
perl-mime-base64
|
|
perl-mime-body
|
|
perl-mime-decoder
|
|
perl-mime-decoder-base64
|
|
perl-mime-decoder-binary
|
|
perl-mime-decoder-binhex
|
|
perl-mime-decoder-gzip64
|
|
perl-mime-decoder-nbit
|
|
perl-mime-decoder-quotedprint
|
|
perl-mime-decoder-uu
|
|
perl-mime-entity
|
|
perl-mime-field-contdisp
|
|
perl-mime-field-contraenc
|
|
perl-mime-field-conttype
|
|
perl-mime-field-paramval
|
|
perl-mime-head
|
|
perl-mime-parser
|
|
perl-mime-parser-filer
|
|
perl-mime-parser-reader
|
|
perl-mime-parser-results
|
|
perl-mime-worddecoder
|
|
perl-mime-words
|
|
perl-module-corelist
|
|
perl-module-load
|
|
perl-module-load-conditional
|
|
perl-module-loaded
|
|
perl-module-metadata
|
|
perl-net-ping
|
|
perl-package-constants
|
|
perl-params-check
|
|
perl-parent
|
|
perl-parse-cpan-meta
|
|
perl-passwd-md5
|
|
perl-pathtools
|
|
perl-perlfaq
|
|
perl-perlio-via-quotedprint
|
|
perl-perl-ostype
|
|
perl-pod-checker
|
|
perl-pod-escapes
|
|
perl-podlators
|
|
perl-pod-parser
|
|
perl-pod-perldoc
|
|
perl-pod-simple
|
|
perl-pod-usage
|
|
perl-safe
|
|
perl-scalar-list-utils
|
|
perl-search-dict
|
|
perl-selfloader
|
|
perl-sms-token
|
|
perl-sms-token-da
|
|
perl-sms-token-dcs
|
|
perl-sms-token-mr
|
|
perl-sms-token-oa
|
|
perl-sms-token-pdutype
|
|
perl-sms-token-pid
|
|
perl-sms-token-sca
|
|
perl-sms-token-scts
|
|
perl-sms-token-ud
|
|
perl-sms-token-vp
|
|
perl-soap-constants
|
|
perl-soap-lite-deserializer-xmlschema1999
|
|
perl-soap-lite-deserializer-xmlschema2001
|
|
perl-soap-lite-deserializer-xmlschemasoap1_1
|
|
perl-soap-lite-deserializer-xmlschemasoap1_2
|
|
perl-soap-lite-packager
|
|
perl-soap-lite-utils
|
|
perl-soap-packager
|
|
perl-soap-test
|
|
perl-soap-transport-http
|
|
perl-soap-transport-io
|
|
perl-soap-transport-local
|
|
perl-soap-transport-loopback
|
|
perl-soap-transport-mailto
|
|
perl-soap-transport-pop3
|
|
perl-soap-transport-tcp
|
|
perl-socket
|
|
perl-storable
|
|
perl-sys-syslog
|
|
perl-term-ansicolor
|
|
perl-term-cap
|
|
perl-term-complete
|
|
perl-term-readline
|
|
perl-test
|
|
perl-test-harness
|
|
perl-test-simple
|
|
perl-text-abbrev
|
|
perl-text-balanced
|
|
perl-text-parsewords
|
|
perl-text-tabs
|
|
perl-thread-queue
|
|
perl-threads
|
|
perl-thread-semaphore
|
|
perl-threads-shared
|
|
perl-tie-file
|
|
perl-tie-refhash
|
|
perl-time-hires
|
|
perl-time-local
|
|
perl-time-piece
|
|
perl-uddi-lite
|
|
perl-unicode-collate
|
|
perl-unicode-normalize
|
|
perl-unicode-stringprep-bidi
|
|
perl-unicode-stringprep-mapping
|
|
perl-unicode-stringprep-prohibited
|
|
perl-unicode-stringprep-unassigned
|
|
perl-uri-escape
|
|
perl-version
|
|
perlxml
|
|
perl-xml-libxml-common
|
|
perl-xml-parser-lite
|
|
perl-xmlrpc-lite
|
|
perl-xmlrpc-test
|
|
perl-xmlrpc-transport-http
|
|
perl-xmlrpc-transport-pop3
|
|
perl-xmlrpc-transport-tcp
|
|
perl-xsloader
|
|
phonon
|
|
phonon-backend
|
|
phonon-qt4-backend
|
|
phonon-qt5-backend
|
|
php-apc
|
|
pion-net
|
|
pkgconfig
|
|
plan9
|
|
polkit-qt
|
|
pop3-server
|
|
poppler-qt
|
|
portaudio_cpp
|
|
postgresql-client
|
|
premake4
|
|
procinfo
|
|
procps
|
|
protobuf-python
|
|
proxychains
|
|
psutils-lprng
|
|
puredata
|
|
py3gobject
|
|
pyaim
|
|
pyasn1
|
|
pyatspi
|
|
pybonjour
|
|
pycairo
|
|
pycrypto
|
|
pycups
|
|
pydot
|
|
pyexiv2
|
|
pyglet
|
|
pygobject
|
|
pyopenssl
|
|
pypoppler
|
|
pyqt
|
|
pyqt-common
|
|
pysmbc
|
|
python2-distribute
|
|
python2-gevent-beta
|
|
python2-imaging
|
|
python2-mayavi
|
|
python2-mmkeys
|
|
python2-openpyxl
|
|
python2-pyqt
|
|
python2-pyxenstore
|
|
python2-udev
|
|
python3
|
|
python3-numpy
|
|
python3-scipy
|
|
python-antlr
|
|
python-beautifulsoup
|
|
python-caja
|
|
python-cheetah
|
|
python-distribute
|
|
python-gflags
|
|
python-imaging
|
|
python-keybinder
|
|
python-nautilus
|
|
python-openpyxl
|
|
python-poppler
|
|
python-waf
|
|
pyudev
|
|
pyxattr
|
|
pyxdg
|
|
qt-doc
|
|
qupzilla-qt5
|
|
raismth
|
|
rake
|
|
remmina-plugins
|
|
resolvconf
|
|
rouge
|
|
rox-lib2
|
|
rubygems
|
|
rxtx
|
|
sbuild
|
|
scipy
|
|
sdl_perl
|
|
setuptools
|
|
sh
|
|
smtp-forwarder
|
|
smtp-server
|
|
speechd
|
|
sqlite3
|
|
sqlite3-doc
|
|
sqlite3-tcl
|
|
squeak
|
|
sunpinyin-data-le
|
|
svn
|
|
synaptics
|
|
synce-librapi
|
|
synce-libsynce
|
|
systemd-tools
|
|
sysvinit-tools
|
|
telepathy-qt4
|
|
test-number-delta
|
|
Test::Number::Delta
|
|
tetex
|
|
texlive-langafrican
|
|
texlive-langarabic
|
|
texlive-langarmenian
|
|
texlive-langcroatian
|
|
texlive-langhebrew
|
|
texlive-langindic
|
|
texlive-langmongolian
|
|
texlive-langtibetan
|
|
texlive-langvietnamese
|
|
texlive-latex3
|
|
timedate
|
|
tint
|
|
toluapp
|
|
ttf-fireflysung
|
|
ttf-font
|
|
turbojpeg
|
|
twisted
|
|
udev
|
|
umfpack
|
|
urw-fonts
|
|
urxvt-keyboard-select
|
|
urxvt-url-select
|
|
util-linux-ng
|
|
vapoursynth-plugin-ffms2
|
|
vlock
|
|
webkitgtk3
|
|
x264-10bit
|
|
x264-dev
|
|
x2goagent
|
|
X-ABI-EXTENSION_VERSION
|
|
X-ABI-VIDEODRV_VERSION
|
|
X-ABI-XINPUT_VERSION
|
|
xf86-video-intel-sna
|
|
xf86-video-intel-uxa
|
|
xfce4-dict-plugin
|
|
xfsacl
|
|
xfsattr
|
|
xfsdmapi
|
|
xindy
|
|
xkbdata
|
|
xorriso
|
|
xorriso-tcltk
|
|
x-server
|
|
zbar-gtk
|
|
zbar-qt
|
|
zd1211
|
|
zeitgeist-datahub
|
|
zope-interface' | while read line; do echo $line >> virtual-packages; done
|
|
fi
|
|
|
|
if [ ! -e aur-packages ]; then
|
|
curl -s -C - -f https://aur.archlinux.org/packages.gz > aur-packages.gz
|
|
gzip -d aur-packages.gz
|
|
fi
|
|
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//') | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' > result1
|
|
grep -q "^$j$" result1 virtual-packages aur-packages && echo "$j" > tempfile
|
|
grep -q "^$(echo "$j" | sed s'/^lib//')$" result1 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' >> tempfile
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $4}' | wc -c)
|
|
o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/-/ /g' | gawk '{print $5}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n + $o + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} {$(($k + $l + $m + $n + 1))..$(($k + $l + $m + $n + $o - 1))} $(($k + $l + $m + $n + $o + 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 2))} $(($k + $l + $m + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} {$(($k + $l + $m + $n + 1))..$(($k + $l + $m + $n + $o))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 2))} $(($k + $l + $m + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} {$(($k + $l + $m + $n - 1))..$(($k + $l + $m + $n + $o - 3))} $(($k + $l + $m + $n + $o - 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} {$(($k + $l + $m + $n - 1))..$(($k + $l + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n + $o - 2))} $(($k + $l + $m + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 3))} $(($k + $l + $m + $n + $o - 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 3))} $(($k + $l + $m + $n + $o - 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n + $o - 4))} $(($k + $l + $m + $n + $o - 2))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n + $o - 3))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} {$(($k + $l + $m + $n + 1))..$(($k + $l + $m + $n + $o - 1))} $(($k + $l + $m + $n + $o + 1))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} {$(($k + $l + $m + $n + 1))..$(($k + $l + $m + $n + $o))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n + $o - 2))} $(($k + $l + $m + $n + $o))); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/[a-z]/ /' | gawk '{print $2}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $3}' | wc -c)
|
|
o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/-/ /g' | gawk '{print $4}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n + $o))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 2))} $(($k + $l + $m + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} {$(($k + $l + $m + $n - 1))..$(($k + $l + $m + $n + $o - 3))} $(($k + $l + $m + $n + $o - 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} {$(($k + $l + $m + $n - 1))..$(($k + $l + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 3))} $(($k + $l + $m + $n + $o - 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n + $o - 4))} $(($k + $l + $m + $n + $o - 2))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n + $o - 3))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 2))} $(($k + $l + $m + $n + $o))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 3))} $(($k + $l + $m + $n + $o - 1))); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $4}' | wc -c)
|
|
o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/[a-z]/ /g' | gawk '{print $4}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n + $o))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} {$(($k + $l + $m + $n + 1))..$(($k + $l + $m + $n + $o))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} {$(($k + $l + $m + $n - 1))..$(($k + $l + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n + $o - 3))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} {$(($k + $l + $m + $n + 1))..$(($k + $l + $m + $n + $o))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/[a-z]/ /' | gawk '{print $2}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/\./ /g' | gawk '{print $3}' | wc -c)
|
|
o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/[a-z]/ /g' | gawk '{print $4}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n + $o - 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} {$(($k + $l + $m + $n - 1))..$(($k + $l + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n + $o - 3))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | sed s'/\./ /' | gawk '{print $3}' | wc -c)
|
|
o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/-/ /g' | gawk '{print $4}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + $o + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} {$(($k + $m + $n + 1))..$(($k + $m + $n + $o - 1))} $(($k + $m + $n + $o + 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} {$(($k + $m + $n + 1))..$(($k + $m + $n + $o))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 3))} $(($k + $m + $n + $o - 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} {$(($k + $m + $n + 1))..$(($k + $m + $n + $o - 1))} $(($k + $m + $n + $o + 1))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} {$(($k + $m + $n + 1))..$(($k + $m + $n + $o))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | sed s'/\./ /' | gawk '{print $2}' | wc -c)
|
|
o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/-/ /g' | gawk '{print $3}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + $o))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 3))} $(($k + $m + $n + $o - 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 3))} $(($k + $m + $n + $o - 1))); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | sed s'/\./ /' | gawk '{print $3}' | wc -c)
|
|
o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/[a-z]/ /g' | gawk '{print $3}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + $o))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} {$(($k + $m + $n + 1))..$(($k + $m + $n + $o))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} {$(($k + $m + $n + 1))..$(($k + $m + $n + $o))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /' -e s'/\./ /' | gawk '{print $2}' | wc -c)
|
|
o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/[a-z]/ /g' | gawk '{print $3}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + $o - 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $3}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} $(($k + $l + $m + $n + 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} $(($k + $l + $m + $n))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} $(($k + $l + $m + $n))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} $(($k + $l + $m + $n - 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} $(($k + $l + $m + $n + 1))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/[a-z]/ /' | gawk '{print $2}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} $(($k + $l + $m + $n))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} $(($k + $l + $m + $n - 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} $(($k + $l + $m + $n))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/[a-z]/ /' | gawk '{print $2}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n - 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $3}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} $(($k + $m + $n + 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} $(($k + $m + $n))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} $(($k + $m + $n + 1))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} $(($k + $m + $n))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} $(($k + $m + $n))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n - 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+\.[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $3}' | wc -c)
|
|
o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/-/ /g' | gawk '{print $4}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + $o))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 3))} $(($k + $m + $n + $o - 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 3))} $(($k + $m + $n + $o - 1))); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+\.[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/\./ /g' | gawk '{print $3}' | wc -c)
|
|
o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/[a-z]/ /g' | gawk '{print $3}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + $o - 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+\.[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} $(($k + $m + $n))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} $(($k + $m + $n))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+\.[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/[a-z]/ /g' | gawk '{print $3}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n - 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$k}); do
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+$"; echo $?) -eq 0 ]; then
|
|
m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | sed s'/\./ /' | gawk '{print $2}' | wc -c)
|
|
o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/-/ /g' | gawk '{print $3}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n + $o + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o - 1))} $(($m + $n + $o + 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 2))} $(($m + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o - 1))} $(($m + $n + $o + 1))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 2))} $(($m + $n + $o))); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+$"; echo $?) -eq 0 ]; then
|
|
m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /' -e s'/\./ /' | gawk '{print $2}' | wc -c)
|
|
o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n + $o))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+$"; echo $?) -eq 0 ]; then
|
|
m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} $(($m + $n + 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} $(($m + $n + 1))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+$"; echo $?) -eq 0 ]; then
|
|
m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/[a-z]/ /g' | gawk '{print $1}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+\.[a-z]\+$"; echo $?) -eq 0 ]; then
|
|
m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $3}' | wc -c)
|
|
o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/-/ /g' | gawk '{print $4}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n + $o + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o - 1))} $(($m + $n + $o + 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 2))} $(($m + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o - 1))} $(($m + $n + $o + 1))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 2))} $(($m + $n + $o))); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+\.[a-z]\+$"; echo $?) -eq 0 ]; then
|
|
m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/\./ /g' | gawk '{print $3}' | wc -c)
|
|
o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n + $o))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+\.[a-z]\+$"; echo $?) -eq 0 ]; then
|
|
m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} $(($m + $n + 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} $(($m + $n + 1))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+\.[a-z]\+$"; echo $?) -eq 0 ]; then
|
|
m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
|
|
p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
grep -q "^$(echo "$j" | rev | cut -c $(($k + $l + $m + 1))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $(($k + $l + $m + 1))- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + 1))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + 1))- | rev >> tempfile;
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/[a-z]/ /' | gawk '{print $2}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
grep -q "^$(echo "$j" | rev | cut -c $(($k + $l + $m))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $(($k + $l + $m))- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m))- | rev >> tempfile;
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
grep -q "^$(echo "$j" | rev | cut -c $(($k + $m + 1))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $(($k + $m + 1))- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + 1))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + 1))- | rev >> tempfile;
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$k}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
grep -q "^$(echo "$j" | rev | cut -c $(($k + $m))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $(($k + $m))- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m))- | rev >> tempfile;
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+\.[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
|
|
m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$k}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
grep -q "^$(echo "$j" | rev | cut -c $(($k + $m))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $(($k + $m))- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m))- | rev >> tempfile;
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+$"; echo $?) -eq 0 ]; then
|
|
m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
grep -q "^$(echo "$j" | rev | cut -c $(($m + 1))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $(($m + 1))- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + 1))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + 1))- | rev >> tempfile;
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+\.[a-z]\+$"; echo $?) -eq 0 ]; then
|
|
m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
grep -q "^$(echo "$j" | rev | cut -c $(($m + 1))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $(($m + 1))- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + 1))- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + 1))- | rev >> tempfile;
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $3}' | wc -c)
|
|
o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/-/ /g' | gawk '{print $4}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $n + $o + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} {$(($k + $l + $n + 1))..$(($k + $l + $n + $o - 1))} $(($k + $l + $n + $o + 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} {$(($k + $l + $n + 1))..$(($k + $l + $n + $o))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l))..$(($k + $l + $n - 2))} {$(($k + $l + $n))..$(($k + $l + $n + $o - 2))} $(($k + $l + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l))..$(($k + $l + $n - 2))} {$(($k + $l + $n))..$(($k + $l + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n + $o - 2))} $(($k + $l + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l))..$(($k + $l + $n + $o - 3))} $(($k + $l + $n + $o - 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l))..$(($k + $l + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} {$(($k + $l + $n + 1))..$(($k + $l + $n + $o - 1))} $(($k + $l + $n + $o + 1))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} {$(($k + $l + $n + 1))..$(($k + $l + $n + $o))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n + $o - 2))} $(($k + $l + $n + $o))); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $3}' | wc -c)
|
|
o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/[a-z]/ /g' | gawk '{print $3}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $n + $o))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} {$(($k + $l + $n + 1))..$(($k + $l + $n + $o))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l))..$(($k + $l + $n - 2))} {$(($k + $l + $n))..$(($k + $l + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l))..$(($k + $l + $n + $o - 2))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} {$(($k + $l + $n + 1))..$(($k + $l + $n + $o))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | sed s'/\./ /' | gawk '{print $2}' | wc -c)
|
|
o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/-/ /g' | gawk '{print $3}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $n + $o + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} {$(($k + $n + 1))..$(($k + $n + $o - 1))} $(($k + $n + $o + 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} {$(($k + $n + 1))..$(($k + $n + $o))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n + $o - 2))} $(($k + $n + $o))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} {$(($k + $n + 1))..$(($k + $n + $o - 1))} $(($k + $n + $o + 1))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} {$(($k + $n + 1))..$(($k + $n + $o))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n + $o - 2))} $(($k + $n + $o))); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | sed s'/\./ /' | gawk '{print $2}' | wc -c)
|
|
o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $n + $o))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} {$(($k + $n + 1))..$(($k + $n + $o))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n + $o - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} {$(($k + $n + 1))..$(($k + $n + $o))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n + $o - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $n + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} $(($k + $l + $n + 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l))..$(($k + $l + $n - 2))} $(($k + $l + $n))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l))..$(($k + $l + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} $(($k + $l + $n + 1))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $n))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
for r in $(eval echo {$(($k + $l))..$(($k + $l + $n - 1))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $n + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} $(($k + $n + 1))); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} $(($k + $n + 1))); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $n))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n))}); do
|
|
grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages aur-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
|
|
done
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for r in $(eval echo {$(($k + 1))..$(($k + $n))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 2))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
|
|
done
|
|
fi
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
|
|
l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/[a-z]/ /' | gawk '{print $2}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$(($k + $l - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + 1))- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$(($k - 1))}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
|
|
done
|
|
if [ ! -e tempfile ]; then
|
|
for q in $(eval echo {1..$k}); do
|
|
grep -q "^$(echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
|
|
k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | rev | cut -c $k- | rev) | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
|
|
for q in $(eval echo {1..$k}); do
|
|
grep -q "^$(echo "$j" | rev | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev)$" result2 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
|
|
done
|
|
fi
|
|
|
|
if [ ! -e tempfile ]; then
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | sed s'/[0-9]\|\.\|-/ /g') | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' > result3
|
|
grep -q "^$(echo "$j" | sed -e s'/[0-9]\|\.//g' -e s'/-\+/-/g' -e s'/-$//g')$" result3 virtual-packages aur-packages && echo "$j" | sed -e s'/[0-9]\|\.//g' -e s'/-\+/-/g' -e s'/-$//g' >> tempfile
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | sed -e s'/[0-9]\|\.//g' -e s'/-\+/-/g' -e s'/-$//g')$" result3 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | sed -e s'/[0-9]\|\.//g' -e s'/-\+/-/g' -e s'/-$//g' >> tempfile
|
|
fi
|
|
|
|
if [ ! -e tempfile ]; then
|
|
word_count=$(echo "$j" | sed s'/^lib//' | sed s'/[0-9]\|\.\|-/ /g' | wc -w)
|
|
pacman -Ssq $(echo "$j" | sed s'/^lib//' | sed s'/[0-9]\|\.\|-/ /g' | gawk '{print $1}') | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' > result3
|
|
for s in $(eval echo {$word_count..1}); do
|
|
grep -q "^$(echo "$j" | sed -e s'/[0-9]\|\.\|-/ /g' -e s'/ \+/ /g' | cut -d ' ' -f1-$s | sed s'/ /-/g')$" result3 virtual-packages aur-packages && echo "$j" | sed -e s'/[0-9]\|\.\|-/ /g' -e s'/ \+/ /g' | cut -d ' ' -f1-$s | sed s'/ /-/g' >> tempfile
|
|
grep -q "^$(echo "$j" | sed s'/^lib//' | sed -e s'/[0-9]\|\.\|-/ /g' -e s'/ \+/ /g' | cut -d ' ' -f1-$s | sed s'/ /-/g')$" result3 virtual-packages aur-packages && echo "$j" | sed s'/^lib//' | sed -e s'/[0-9]\|\.\|-/ /g' -e s'/ \+/ /g' | cut -d ' ' -f1-$s | sed s'/ /-/g' >> tempfile
|
|
done
|
|
fi
|
|
|
|
if [ -e tempfile ] && [ $(grep pkgname .PKGINFO | gawk '{print $3}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | grep -q "^$(head -1 tempfile)$"; echo $?) != 0 ]; then
|
|
for t in {svn,git,cvs,bzr,darcs,hg}; do
|
|
if [ $(echo "$i" | grep -q "\-$t$"; echo $?) -eq 0 ]; then
|
|
grep "^$i$\|^$i " new-untranslated | sed s"/^$i/$(head -1 tempfile))-$t/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
|
|
fi
|
|
done
|
|
if [ $(echo "$i" | grep -q '\-svn$\|\-git$\|\-cvs$\|\-bzr$\|\-darcs$\|\-hg$'; echo $?) -ne 0 ]; then
|
|
grep "^$i$\|^$i " new-untranslated | sed s"/^$i/$(head -1 tempfile)/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
|
|
fi
|
|
sed -i "/^$i$\|^$i /d" new-untranslated
|
|
fi
|
|
|
|
rm -rf tempfile result*
|
|
done
|
|
|
|
rm -rf new-untranslated-names-only
|
|
fi
|
|
|
|
# Appending untranslated packages names (if any exist) to the translated packages names list
|
|
if [ $(cat new-untranslated 2> /dev/null | wc -l) -ne 0 ]; then
|
|
tac new-untranslated | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
|
|
gawk '{print $1}' new-untranslated | sort -u > $(echo `ls | grep initial-check-list` | sed s'/initial-check-list/untranslated-names-only/')
|
|
fi
|
|
rm -rf new-untranslated
|
|
|
|
# Sorting packages with missing files (if any exist)
|
|
if [ -e missing-files ]; then
|
|
sort -u missing-files > $(echo `ls | grep initial-check-list` | sed s'/initial-check-list/missing-files/')
|
|
rm -rf missing-files
|
|
fi
|
|
|
|
# Special rules for non optional dependencies
|
|
if [ -e dependencies-initial-check-list ]; then
|
|
grep -q qt final-check-list && echo hicolor-icon-theme >> final-check-list
|
|
grep -q gtk final-check-list && echo -e "hicolor-icon-theme\ndesktop-file-utils" >> final-check-list
|
|
grep -q Python-Version: control && echo python`grep Python-Version: control | gawk '{print $2}' | sed s'/\.//g'` >> final-check-list
|
|
fi
|
|
|
|
# Appending ready translated names (if any needed) to the translated packages names list
|
|
grep -q libgl1 tempfile02 && echo libgl >> final-check-list;
|
|
grep -q libglu1 tempfile02 && echo glu >> final-check-list;
|
|
grep -q default-jre tempfile02 && echo java-runtime >> final-check-list;
|
|
grep -q python:any tempfile02 && echo python >> final-check-list;
|
|
grep libpango tempfile02 | grep -v libpangomm | sed s"/`grep libpango tempfile02 | grep -v libpangomm | gawk '{print $1}' | head -1`/pango/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib$\|^lib32-//g' >> final-check-list;
|
|
grep libpangomm tempfile02 | sed s"/`grep libpangomm tempfile02 | gawk '{print $1}' | head -1`/pangomm/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib$\|^lib32-//g' >> final-check-list;
|
|
grep -q fonts-freefont-ttf tempfile02 && echo ttf-freefont >> final-check-list;
|
|
|
|
# Stripping unnecessary symbols and words from packages versions
|
|
grep -v "^$" final-check-list | while read line; do
|
|
echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}' | sed s'/^[^:]*://' | sed -e s'/[+~]/-/g' -e s'/[-._]alpha/alpha/' -e s'/[-._]beta/beta/' -e s'/[-._]pre/pre/' -e s'/[-._]rc/rc/' -e s'/[-._]dfsg/dfsg/' | gawk -F 'dev' '{print $1}' | sed -e s'/-\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+\.[0-9]\+//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]*[a-z]*[0-9]*//g' -e s'/--/-/g' -e s'/\.\././g' | sed s'/\.$//'`" >> tempfile13;
|
|
done
|
|
|
|
# Special rules for version control systems
|
|
cat tempfile13 | while read line; do
|
|
for i in {git,bzr,darcs,hg}; do
|
|
if [ $(echo "$line" | gawk '{print $3}' | grep -q $i; echo $?) -eq 0 ]; then
|
|
echo "$(echo `echo "$line" | gawk '{print $1}'`-$i | sed s"/-$i-$i/-$i/") `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}' | gawk -F "$i" '{print $2}' | gawk -F '-' '{print $1}'`" >> tempfile14;
|
|
fi
|
|
done
|
|
for i in {svn.r,svnr}; do
|
|
if [ $(echo "$line" | gawk '{print $3}' | grep -q $i; echo $?) -eq 0 ]; then
|
|
echo "$(echo `echo "$line" | gawk '{print $1}'`-svn | sed s'/-svn-svn/-svn/') `echo "$line" | gawk '{print $2}'` r`echo "$line" | gawk '{print $3}' | gawk -F "$i" '{print $2}' | gawk -F '-' '{print $1}'`" >> tempfile14;
|
|
fi
|
|
done
|
|
if [ $(echo "$line" | gawk '{print $3}' | grep -q svn; echo $?) -eq 0 ] && [ $(echo "$line" | gawk '{print $3}' | grep -q "svn\.r\|svnr"; echo $?) -ne 0 ]; then
|
|
echo "$(echo `echo "$line" | gawk '{print $1}'`-svn | sed s'/-svn-svn/-svn/') `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}' | gawk -F 'svn' '{print $2}' | gawk -F '-' '{print $1}'`" >> tempfile14;
|
|
fi
|
|
for i in {cvs,CVS}; do
|
|
if [ $(echo "$line" | gawk '{print $3}' | grep -q $i; echo $?) -eq 0 ]; then
|
|
echo "$(echo `echo "$line" | gawk '{print $1}'`-cvs | sed s'/-cvs-cvs/-cvs/') `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}' | sed -e s"/[-.]$i/ /g" -e s"/$i/ /g" -e s"/-/ /g" | gawk '{print $2}'`" >> tempfile14;
|
|
fi
|
|
done
|
|
if [ $(echo "$line" | gawk '{print $3}' | grep -q "svn\|git\|cvs\|CVS\|bzr\|darcs\|hg"; echo $?) -ne 0 ]; then
|
|
echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}' | gawk -F '-[0-9]' '{print $1}' | sed s'/-/./'`" >> tempfile14;
|
|
fi
|
|
done
|
|
|
|
# Sorting packages names and versions
|
|
sort -u tempfile14 > tempfile15
|
|
|
|
# Sorting only packages names
|
|
gawk '{print $1}' tempfile15 | sort -u > tempfile16
|
|
|
|
# Removing packages names that are the same with the name of the package to be converted from translated packages list (if any exist)
|
|
for i in `cat tempfile16`; 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 " $i "; echo $?) != 0 ]; then
|
|
grep "^$i$\|^$i " tempfile15 >> $i-tempfile17
|
|
fi
|
|
done
|
|
|
|
# Isolating versions from packages
|
|
for i in `ls | grep tempfile17`; do
|
|
if [ $(grep -q "=\|>\|<" $i; echo $?) -ne 0 ]; then
|
|
cat $i >> `echo $i | sed s'/tempfile17/tempfile19/'`
|
|
else
|
|
cat $i | while read line; do
|
|
echo $line | gawk '{print $3}' | sed -e s'/\.[a-z]/ /g' -e s'/[a-z]/ /g' | gawk '{print $1}' >> `echo $i | sed s'/tempfile17/tempfile18/'`
|
|
done
|
|
fi
|
|
done
|
|
|
|
# Sorting versions for each package
|
|
for i in `ls | grep tempfile18`; do
|
|
j=`echo $i | sed s'/tempfile18/tempfile17/'`
|
|
k=`echo $i | sed s'/tempfile18/tempfile19/'`
|
|
for l in `sort -uV $i | grep -v "^$"`; do
|
|
grep -q "$l[a-z]\+" $j && grep "$l[a-z]\+" $j | sort -V >> $k
|
|
grep -q "$l$" $j && grep "$l$" $j >> $k
|
|
grep -q "$l\.[a-z]\+" $j && grep "$l\.[a-z]\+" $j | sort -V >> $k
|
|
done
|
|
done
|
|
|
|
# Choosing the appropriate version for each package
|
|
for i in `ls | grep tempfile19`; do
|
|
if [ $(grep -q "=\|>\|<" $i; echo $?) -ne 0 ]; then
|
|
cat $i >> tempfile20;
|
|
elif [ $(grep -q "=" $i; echo $?) -eq 0 ] && [ $(grep -q ">\|<" $i; echo $?) -ne 0 ]; then
|
|
grep "=" $i | tail -1 | sed s'/ //g' >> tempfile20;
|
|
elif [ $(grep -q ">" $i; echo $?) -eq 0 ] && [ $(grep -q "<" $i; echo $?) -ne 0 ]; then
|
|
grep ">" $i | tail -1 | sed s'/ //g' >> tempfile20;
|
|
elif [ $(grep -q "<" $i; echo $?) -eq 0 ] && [ $(grep -q ">" $i; echo $?) -ne 0 ]; then
|
|
grep "<" $i | head -1 | sed s'/ //g' >> tempfile20;
|
|
elif [ $(grep -q ">" $i; echo $?) -eq 0 ] && [ $(grep -q "<" $i; echo $?) -eq 0 ]; then
|
|
grep ">" $i | tail -1 | sed s'/ //g' >> tempfile20;
|
|
grep "<" $i | head -1 | sed s'/ //g' >> tempfile20;
|
|
fi
|
|
done
|
|
}
|
|
|
|
# Generating replacements fields
|
|
if [ $(grep -q Replaces: control; echo $?) -eq 0 ]; then
|
|
grep Replaces: control | sed -e s'/Replaces: //' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /</g' -e s'/ |//g' | tr -d "," | while read line; do
|
|
for word in $line; do
|
|
echo $word >> tempfile01
|
|
done
|
|
done
|
|
sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
|
|
grep -v 'libgl1\|libglu1\|default-jre\|python:any\|libpango\|fonts-freefont-ttf\|dpkg' tempfile02 > replacements-initial-check-list
|
|
packages-names-translator
|
|
for i in `sort -u tempfile20`; do echo "replaces = $i" >> .PKGINFO ; done
|
|
rm -rf *tempfile* replacements-initial-check-list final-check-list
|
|
fi
|
|
|
|
# Generating conflicts fields
|
|
if [ $(grep -q Conflicts: control; echo $?) -eq 0 ]; then
|
|
grep Conflicts: control | sed -e s'/Conflicts: //' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /</g' -e s'/ |//g' | tr -d "," | while read line; do
|
|
for word in $line; do
|
|
echo $word >> tempfile01
|
|
done
|
|
done
|
|
sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
|
|
grep -v 'libgl1\|libglu1\|default-jre\|python:any\|libpango\|fonts-freefont-ttf\|dpkg' tempfile02 > conflicts-initial-check-list
|
|
packages-names-translator
|
|
for i in `sort -u tempfile20`; do echo "conflict = $i" >> .PKGINFO ; done
|
|
rm -rf *tempfile* conflicts-initial-check-list final-check-list
|
|
fi
|
|
|
|
# Generating provisions fields
|
|
if [ $(grep -q Provides: control; echo $?) -eq 0 ]; then
|
|
grep Provides: control | sed -e s'/Provides: //' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /</g' -e s'/ |//g' | tr -d "," | while read line; do
|
|
for word in $line; do
|
|
echo $word >> tempfile01
|
|
done
|
|
done
|
|
sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
|
|
grep -v 'libgl1\|libglu1\|default-jre\|python:any\|libpango\|fonts-freefont-ttf\|dpkg' tempfile02 > provisions-initial-check-list
|
|
packages-names-translator
|
|
for i in `sort -u tempfile20`; do echo "provides = $i" >> .PKGINFO ; done
|
|
rm -rf *tempfile* provisions-initial-check-list final-check-list
|
|
fi
|
|
|
|
# Generating backups fields
|
|
if [ -e conffiles ]; then
|
|
sed s'/^\///g' conffiles > tempfile
|
|
if [ $(grep Architecture: control | grep -q i386; echo $?) -eq 0 ]; then
|
|
sed -i -e s'/^bin\//usr\/bin\//g' -e s'/^sbin\//usr\/bin\//g' -e s'/^usr\/sbin\//usr\/bin\//g' -e s'/^usr\/games\//usr\/bin\//g' -e s'/^lib\//usr\/lib\//g' -e s'/^lib32\//usr\/lib\//g' -e s'/^usr\/lib32\//usr\/lib\//g' -e s'/^usr\/local\/sbin\//usr\/bin\//g' -e s'/^usr\/local\/games\//usr\/bin\//g' -e s'/^usr\/local\/lib32\//usr\/lib\//g' -e s'/^usr\/local\//usr\//g' tempfile
|
|
else
|
|
sed -i -e s'/^bin\//usr\/bin\//g' -e s'/^sbin\//usr\/bin\//g' -e s'/^usr\/sbin\//usr\/bin\//g' -e s'/^usr\/games\//usr\/bin\//g' -e s'/^lib\//usr\/lib\//g' -e s'/^lib32\//usr\/lib32\//g' -e s'/^lib64\//usr\/lib\//g' -e s'/^usr\/lib64\//usr\/lib\//g' -e s'/^usr\/local\/sbin\//usr\/bin\//g' -e s'/^usr\/local\/games\//usr\/bin\//g' -e s'/^usr\/local\/lib64\//usr\/lib\//g' -e s'/^usr\/local\//usr\//g' tempfile
|
|
fi
|
|
for i in `sort -u tempfile`; do echo "backup = $i" >> .PKGINFO ; done
|
|
rm -rf tempfile
|
|
fi
|
|
|
|
# Generating non optional dependencies fields
|
|
if [ $(grep -q Depends: control; echo $?) -eq 0 ]; then
|
|
grep Depends: control | sed -e s'/Pre-Depends: //' -e s'/Depends: //' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /</g' -e s'/ |//g' | tr -d "," | while read line; do
|
|
for word in $line; do
|
|
echo $word >> tempfile01
|
|
done
|
|
done
|
|
sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
|
|
grep -v 'libgl1\|libglu1\|default-jre\|python:any\|libpango\|fonts-freefont-ttf\|dpkg' tempfile02 > dependencies-initial-check-list
|
|
packages-names-translator
|
|
for i in `sort -u tempfile20`; do echo "depend = $i" >> .PKGINFO ; done
|
|
rm -rf *tempfile* dependencies-initial-check-list final-check-list
|
|
fi
|
|
|
|
# Generating optional dependencies fields
|
|
if [ $(grep -q 'Recommends:\|Suggests:' control; echo $?) -eq 0 ]; then
|
|
grep 'Recommends:\|Suggests:' control | sed -e s'/Recommends: \|Suggests: //' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /</g' -e s'/ |//g' | tr -d "," | while read line; do
|
|
for word in $line; do
|
|
echo $word >> tempfile01
|
|
done
|
|
done
|
|
sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
|
|
grep -v 'libgl1\|libglu1\|default-jre\|python:any\|libpango\|fonts-freefont-ttf\|dpkg' tempfile02 > optional-dependencies-initial-check-list
|
|
packages-names-translator
|
|
for i in `sort -u tempfile20`; do
|
|
j=$(echo $i | sed s'/=\|>\|</ /' | gawk '{print $1}')
|
|
if [ $(grep -q "^depend = $j$\|^depend = $j=\|^depend = $j>\|^depend = $j<" .PKGINFO; echo $?) -ne 0 ]; then
|
|
echo "optdepend = $i" >> .PKGINFO
|
|
fi
|
|
done
|
|
rm -rf *tempfile* optional-dependencies-initial-check-list final-check-list
|
|
fi
|
|
|
|
# Moving report files to /tmp/debtap-tmp (if any exist)
|
|
mkdir /tmp/debtap-tmp
|
|
mv *untranslated* /tmp/debtap-tmp 2> /dev/null
|
|
mv *missing-files /tmp/debtap-tmp 2> /dev/null
|
|
|
|
# Report of (warning messages for) untranslated packages names and packages with missing files (if any exist)
|
|
if [ -e /tmp/debtap-tmp/dependencies-untranslated-names-only ]; then
|
|
echo -e "\n${lightred}Warning: These dependencies (depend = fields) could not be translated into Arch Linux packages names:${NC}"
|
|
echo `cat /tmp/debtap-tmp/dependencies-untranslated-names-only` | sed s'/ /, /g'
|
|
fi
|
|
if [ -e /tmp/debtap-tmp/dependencies-missing-files ]; then
|
|
if [ -e /tmp/debtap-tmp/dependencies-untranslated-names-only ]; then
|
|
echo -e "${lightred}Warning: These packages names could not be included as dependencies, because debtap has translated them into the same name with the package for conversion. This happens sometimes when you convert packages that already exist in your repositories (which is a bad idea in general). The following packages contain files that are already included in the package from your repositories (without these files your converted package may be dysfunctional):${NC}"
|
|
else
|
|
echo -e "\n${lightred}Warning: These packages names could not be included as dependencies, because debtap has translated them into the same name with the package for conversion. This happens sometimes when you convert packages that already exist in your repositories (which is a bad idea in general). The following packages contain files that are already included in the package from your repositories (without these files your converted package may be dysfunctional):${NC}"
|
|
fi
|
|
echo `cat /tmp/debtap-tmp/dependencies-missing-files` | sed s'/ /, /g'
|
|
fi
|
|
if [ -e /tmp/debtap-tmp/optional-dependencies-untranslated-names-only ]; then
|
|
if [ -e /tmp/debtap-tmp/dependencies-untranslated-names-only ] || [ -e /tmp/debtap-tmp/dependencies-missing-files ]; then
|
|
echo -e "${lightred}Warning: These optional dependencies (optdepend = fields) could not be translated into Arch Linux packages names:${NC}"
|
|
else
|
|
echo -e "\n${lightred}Warning: These optional dependencies (optdepend = fields) could not be translated into Arch Linux packages names:${NC}"
|
|
fi
|
|
echo `cat /tmp/debtap-tmp/optional-dependencies-untranslated-names-only` | sed s'/ /, /g'
|
|
fi
|
|
if [ -e /tmp/debtap-tmp/replacements-untranslated-names-only ]; then
|
|
if [ -e /tmp/debtap-tmp/dependencies-untranslated-names-only ] || [ -e /tmp/debtap-tmp/dependencies-missing-files ] || [ -e /tmp/debtap-tmp/optional-dependencies-untranslated-names-only ]; then
|
|
echo -e "${lightred}Warning: These replacements (replaces = fields) could not be translated into Arch Linux packages names:${NC}"
|
|
else
|
|
echo -e "\n${lightred}Warning: These replacements (replaces = fields) could not be translated into Arch Linux packages names:${NC}"
|
|
fi
|
|
echo `cat /tmp/debtap-tmp/replacements-untranslated-names-only` | sed s'/ /, /g'
|
|
fi
|
|
if [ -e /tmp/debtap-tmp/conflicts-untranslated-names-only ]; then
|
|
if [ -e /tmp/debtap-tmp/dependencies-untranslated-names-only ] || [ -e /tmp/debtap-tmp/dependencies-missing-files ] || [ -e /tmp/debtap-tmp/optional-dependencies-untranslated-names-only ] || [ -e /tmp/debtap-tmp/replacements-untranslated-names-only ]; then
|
|
echo -e "${lightred}Warning: These conflicts (conflict = fields) could not be translated into Arch Linux packages names:${NC}"
|
|
else
|
|
echo -e "\n${lightred}Warning: These conflicts (conflict = fields) could not be translated into Arch Linux packages names:${NC}"
|
|
fi
|
|
echo `cat /tmp/debtap-tmp/conflicts-untranslated-names-only` | sed s'/ /, /g'
|
|
fi
|
|
if [ -e /tmp/debtap-tmp/provisions-untranslated-names-only ]; then
|
|
if [ -e /tmp/debtap-tmp/dependencies-untranslated-names-only ] || [ -e /tmp/debtap-tmp/dependencies-missing-files ] || [ -e /tmp/debtap-tmp/optional-dependencies-untranslated-names-only ] || [ -e /tmp/debtap-tmp/replacements-untranslated-names-only ] || [ -e /tmp/debtap-tmp/conflicts-untranslated-names-only ]; then
|
|
echo -e "${lightred}Warning: These provisions (provides = fields) could not be translated into Arch Linux packages names:${NC}"
|
|
else
|
|
echo -e "\n${lightred}Warning: These provisions (provides = fields) could not be translated into Arch Linux packages names:${NC}"
|
|
fi
|
|
echo `cat /tmp/debtap-tmp/provisions-untranslated-names-only` | sed s'/ /, /g'
|
|
fi
|
|
|
|
# Generating .INSTALL file (if necessary)
|
|
if [ -e preinst ] || [ -e postinst ] || [ -e prerm ] || [ -e postrm ]; then
|
|
echo -e "\n${lightgreen}==>${NC} ${bold}Generating .INSTALL file...${normal}"
|
|
|
|
SAVEIFS=$IFS
|
|
IFS=$'\n'
|
|
if [ -e preinst ] && [ -e postinst ]; then
|
|
echo "pre_install() {" > tempfile
|
|
grep -iv '#!\|automatically\|added\|generated' preinst | while read line; do
|
|
echo " $line" | sed s'/ / /g' >> tempfile
|
|
done
|
|
echo "}" >> tempfile
|
|
echo -e "\npost_install() {" >> tempfile
|
|
if [ $(grep '^depend' .PKGINFO | grep -q qt; echo $?) -eq 0 ]; then
|
|
echo ' xdg-icon-resource forceupdate --theme hicolor &> /dev/null' >> tempfile;
|
|
elif [ $(grep '^depend' .PKGINFO | grep -q gtk; echo $?) -eq 0 ]; then
|
|
echo ' gtk-update-icon-cache -q -t -f usr/share/icons/hicolor' >> tempfile;
|
|
fi
|
|
grep -iv '#!\|automatically\|added\|generated' postinst | while read line; do
|
|
echo " $line" | sed s'/ / /g' >> tempfile
|
|
done
|
|
if [ $(grep '^depend' .PKGINFO | grep -q 'qt\|gtk'; echo $?) -eq 0 ]; then
|
|
echo ' update-desktop-database -q' >> tempfile;
|
|
fi
|
|
echo "}" >> tempfile
|
|
echo -e "\npre_upgrade() {" >> tempfile
|
|
echo " pre_install" >> tempfile
|
|
echo "}" >> tempfile
|
|
echo -e "\npost_upgrade() {" >> tempfile
|
|
echo " post_install" >> tempfile
|
|
echo "}" >> tempfile
|
|
elif [ -e preinst ] && [ ! -e postinst ]; then
|
|
echo "pre_install() {" > tempfile
|
|
grep -iv '#!\|automatically\|added\|generated' preinst | while read line; do
|
|
echo " $line" | sed s'/ / /g' >> tempfile
|
|
done
|
|
echo "}" >> tempfile
|
|
echo -e "\npre_upgrade() {" >> tempfile
|
|
echo " pre_install" >> tempfile
|
|
echo "}" >> tempfile
|
|
elif [ -e postinst ] && [ ! -e preinst ]; then
|
|
echo -e "\npost_install() {" >> tempfile
|
|
if [ $(grep '^depend' .PKGINFO | grep -q qt; echo $?) -eq 0 ]; then
|
|
echo ' xdg-icon-resource forceupdate --theme hicolor &> /dev/null' >> tempfile;
|
|
elif [ $(grep '^depend' .PKGINFO | grep -q gtk; echo $?) -eq 0 ]; then
|
|
echo ' gtk-update-icon-cache -q -t -f usr/share/icons/hicolor' >> tempfile;
|
|
fi
|
|
grep -iv '#!\|automatically\|added\|generated' postinst | while read line; do
|
|
echo " $line" | sed s'/ / /g' >> tempfile
|
|
done
|
|
if [ $(grep '^depend' .PKGINFO | grep -q 'qt\|gtk'; echo $?) -eq 0 ]; then
|
|
echo ' update-desktop-database -q' >> tempfile;
|
|
fi
|
|
echo "}" >> tempfile
|
|
echo -e "\npost_upgrade() {" >> tempfile
|
|
echo " post_install" >> tempfile
|
|
echo "}" >> tempfile
|
|
fi
|
|
|
|
if [ -e prerm ]; then
|
|
echo -e "\npre_remove() {" >> tempfile
|
|
grep -iv '#!\|automatically\|added\|generated' prerm | while read line; do
|
|
echo " $line" | sed s'/ / /g' >> tempfile
|
|
done
|
|
echo "}" >> tempfile
|
|
fi
|
|
|
|
if [ -e postrm ]; then
|
|
echo -e "\npost_remove() {" >> tempfile
|
|
if [ $(grep '^depend' .PKGINFO | grep -q qt; echo $?) -eq 0 ]; then
|
|
echo ' xdg-icon-resource forceupdate --theme hicolor &> /dev/null' >> tempfile;
|
|
elif [ $(grep '^depend' .PKGINFO | grep -q gtk; echo $?) -eq 0 ]; then
|
|
echo ' gtk-update-icon-cache -q -t -f usr/share/icons/hicolor' >> tempfile;
|
|
fi
|
|
grep -iv '#!\|automatically\|added\|generated' postrm | while read line; do
|
|
echo " $line" | sed s'/ / /g' >> tempfile
|
|
done
|
|
if [ $(grep '^depend' .PKGINFO | grep -q 'qt\|gtk'; echo $?) -eq 0 ]; then
|
|
echo ' update-desktop-database -q' >> tempfile;
|
|
fi
|
|
echo "}" >> tempfile
|
|
fi
|
|
IFS=$SAVEIFS
|
|
|
|
if [[ $(sed -n "1{p;q;}" tempfile) == "" ]]; then
|
|
sed -i '1d' tempfile
|
|
fi
|
|
|
|
if [ $(grep Architecture: control \| grep -q i386; echo $?) -eq 0 ]; then
|
|
sed -i -e s'/ \/bin\// \/usr\/bin\//g' -e s'/ \/sbin\// \/usr\/bin\//g' -e s'/ \/usr\/sbin\// \/usr\/bin\//g' -e s'/ \/usr\/games\// \/usr\/bin\//g' -e s'/ \/lib\// \/usr\/lib\//g' -e s'/ \/lib32\// \/usr\/lib\//g' -e s'/ \/usr\/lib32\// \/usr\/lib\//g' -e s'/ \/usr\/local\/sbin\// \/usr\/bin\//g' -e s'/ \/usr\/local\/games\// \/usr\/bin\//g' -e s'/ \/usr\/local\/lib32\// \/usr\/lib\//g' -e s'/ \/usr\/local\// \/usr\//g' tempfile
|
|
sed -i -e s'/=\/bin\//=\/usr\/bin\//g' -e s'/=\/sbin\//=\/usr\/bin\//g' -e s'/=\/usr\/sbin\//=\/usr\/bin\//g' -e s'/=\/usr\/games\//=\/usr\/bin\//g' -e s'/=\/lib\//=\/usr\/lib\//g' -e s'/=\/lib32\//=\/usr\/lib\//g' -e s'/=\/usr\/lib32\//=\/usr\/lib\//g' -e s'/=\/usr\/local\/sbin\//=\/usr\/bin\//g' -e s'/=\/usr\/local\/games\//=\/usr\/bin\//g' -e s'/=\/usr\/local\/lib32\//=\/usr\/lib\//g' -e s'/=\/usr\/local\//=\/usr\//g' tempfile
|
|
sed -i -e s'/>\/bin\//>\/usr\/bin\//g' -e s'/>\/sbin\//>\/usr\/bin\//g' -e s'/>\/usr\/sbin\//>\/usr\/bin\//g' -e s'/>\/usr\/games\//>\/usr\/bin\//g' -e s'/>\/lib\//>\/usr\/lib\//g' -e s'/>\/lib32\//>\/usr\/lib\//g' -e s'/>\/usr\/lib32\//>\/usr\/lib\//g' -e s'/>\/usr\/local\/sbin\//>\/usr\/bin\//g' -e s'/>\/usr\/local\/games\//>\/usr\/bin\//g' -e s'/>\/usr\/local\/lib32\//>\/usr\/lib\//g' -e s'/>\/usr\/local\//>\/usr\//g' tempfile
|
|
sed -i -e s'/<\/bin\//<\/usr\/bin\//g' -e s'/<\/sbin\//<\/usr\/bin\//g' -e s'/<\/usr\/sbin\//<\/usr\/bin\//g' -e s'/<\/usr\/games\//<\/usr\/bin\//g' -e s'/<\/lib\//<\/usr\/lib\//g' -e s'/<\/lib32\//<\/usr\/lib\//g' -e s'/<\/usr\/lib32\//<\/usr\/lib\//g' -e s'/<\/usr\/local\/sbin\//<\/usr\/bin\//g' -e s'/<\/usr\/local\/games\//<\/usr\/bin\//g' -e s'/<\/usr\/local\/lib32\//<\/usr\/lib\//g' -e s'/<\/usr\/local\//<\/usr\//g' tempfile
|
|
sed -i -e s'/"\/bin\//"\/usr\/bin\//g' -e s'/"\/sbin\//"\/usr\/bin\//g' -e s'/"\/usr\/sbin\//"\/usr\/bin\//g' -e s'/"\/usr\/games\//"\/usr\/bin\//g' -e s'/"\/lib\//"\/usr\/lib\//g' -e s'/"\/lib32\//"\/usr\/lib\//g' -e s'/"\/usr\/lib32\//"\/usr\/lib\//g' -e s'/"\/usr\/local\/sbin\//"\/usr\/bin\//g' -e s'/"\/usr\/local\/games\//"\/usr\/bin\//g' -e s'/"\/usr\/local\/lib32\//"\/usr\/lib\//g' -e s'/"\/usr\/local\//"\/usr\//g' tempfile
|
|
sed -i -e s"/'\/bin\//'\/usr\/bin\//g" -e s"/'\/sbin\//'\/usr\/bin\//g" -e s"/'\/usr\/sbin\//'\/usr\/bin\//g" -e s"/'\/usr\/games\//'\/usr\/bin\//g" -e s"/'\/lib\//'\/usr\/lib\//g" -e s"/'\/lib32\//'\/usr\/lib\//g" -e s"/'\/usr\/lib32\//'\/usr\/lib\//g" -e s"/'\/usr\/local\/sbin\//'\/usr\/bin\//g" -e s"/'\/usr\/local\/games\//'\/usr\/bin\//g" -e s"/'\/usr\/local\/lib32\//'\/usr\/lib\//g" -e s"/'\/usr\/local\//'\/usr\//g" tempfile
|
|
else
|
|
sed -i -e s'/ \/bin\// \/usr\/bin\//g' -e s'/ \/sbin\// \/usr\/bin\//g' -e s'/ \/usr\/sbin\// \/usr\/bin\//g' -e s'/ \/usr\/games\// \/usr\/bin\//g' -e s'/ \/lib\// \/usr\/lib\//g' -e s'/ \/lib32\// \/usr\/lib32\//g' -e s'/ \/lib64\// \/usr\/lib\//g' -e s'/ \/usr\/lib64\// \/usr\/lib\//g' -e s'/ \/usr\/local\/sbin\// \/usr\/bin\//g' -e s'/ \/usr\/local\/games\// \/usr\/bin\//g' -e s'/ \/usr\/local\/lib64\// \/usr\/lib\//g' -e s'/ \/usr\/local\// \/usr\//g' tempfile
|
|
sed -i -e s'/=\/bin\//=\/usr\/bin\//g' -e s'/=\/sbin\//=\/usr\/bin\//g' -e s'/=\/usr\/sbin\//=\/usr\/bin\//g' -e s'/=\/usr\/games\//=\/usr\/bin\//g' -e s'/=\/lib\//=\/usr\/lib\//g' -e s'/=\/lib32\//=\/usr\/lib32\//g' -e s'/=\/lib64\//=\/usr\/lib\//g' -e s'/=\/usr\/lib64\//=\/usr\/lib\//g' -e s'/=\/usr\/local\/sbin\//=\/usr\/bin\//g' -e s'/=\/usr\/local\/games\//=\/usr\/bin\//g' -e s'/=\/usr\/local\/lib64\//=\/usr\/lib\//g' -e s'/=\/usr\/local\//=\/usr\//g' tempfile
|
|
sed -i -e s'/>\/bin\//>\/usr\/bin\//g' -e s'/>\/sbin\//>\/usr\/bin\//g' -e s'/>\/usr\/sbin\//>\/usr\/bin\//g' -e s'/>\/usr\/games\//>\/usr\/bin\//g' -e s'/>\/lib\//>\/usr\/lib\//g' -e s'/>\/lib32\//>\/usr\/lib32\//g' -e s'/>\/lib64\//>\/usr\/lib\//g' -e s'/>\/usr\/lib64\//>\/usr\/lib\//g' -e s'/>\/usr\/local\/sbin\//>\/usr\/bin\//g' -e s'/>\/usr\/local\/games\//>\/usr\/bin\//g' -e s'/>\/usr\/local\/lib64\//>\/usr\/lib\//g' -e s'/>\/usr\/local\//>\/usr\//g' tempfile
|
|
sed -i -e s'/<\/bin\//<\/usr\/bin\//g' -e s'/<\/sbin\//<\/usr\/bin\//g' -e s'/<\/usr\/sbin\//<\/usr\/bin\//g' -e s'/<\/usr\/games\//<\/usr\/bin\//g' -e s'/<\/lib\//<\/usr\/lib\//g' -e s'/<\/lib32\//<\/usr\/lib32\//g' -e s'/<\/lib64\//<\/usr\/lib\//g' -e s'/<\/usr\/lib64\//<\/usr\/lib\//g' -e s'/<\/usr\/local\/sbin\//<\/usr\/bin\//g' -e s'/<\/usr\/local\/games\//<\/usr\/bin\//g' -e s'/<\/usr\/local\/lib64\//<\/usr\/lib\//g' -e s'/<\/usr\/local\//<\/usr\//g' tempfile
|
|
sed -i -e s'/"\/bin\//"\/usr\/bin\//g' -e s'/"\/sbin\//"\/usr\/bin\//g' -e s'/"\/usr\/sbin\//"\/usr\/bin\//g' -e s'/"\/usr\/games\//"\/usr\/bin\//g' -e s'/"\/lib\//"\/usr\/lib\//g' -e s'/"\/lib32\//"\/usr\/lib32\//g' -e s'/"\/lib64\//"\/usr\/lib\//g' -e s'/"\/usr\/lib64\//"\/usr\/lib\//g' -e s'/"\/usr\/local\/sbin\//"\/usr\/bin\//g' -e s'/"\/usr\/local\/games\//"\/usr\/bin\//g' -e s'/"\/usr\/local\/lib64\//"\/usr\/lib\//g' -e s'/"\/usr\/local\//"\/usr\//g' tempfile
|
|
sed -i -e s"/'\/bin\//'\/usr\/bin\//g" -e s"/'\/sbin\//'\/usr\/bin\//g" -e s"/'\/usr\/sbin\//'\/usr\/bin\//g" -e s"/'\/usr\/games\//'\/usr\/bin\//g" -e s"/'\/lib\//'\/usr\/lib\//g" -e s"/'\/lib32\//'\/usr\/lib32\//g" -e s"/'\/lib64\//'\/usr\/lib\//g" -e s"/'\/usr\/lib64\//'\/usr\/lib\//g" -e s"/'\/usr\/local\/sbin\//'\/usr\/bin\//g" -e s"/'\/usr\/local\/games\//'\/usr\/bin\//g" -e s"/'\/usr\/local\/lib64\//'\/usr\/lib\//g" -e s"/'\/usr\/local\//'\/usr\//g" tempfile
|
|
fi
|
|
|
|
sed -e s'/ \[\[ "\$1" = "configure" \]\] &&\| && \[\[ "\$1" = "configure" \]\]//g' -e s'/ \[ "\$1" = "configure" \] &&\| && \[ "\$1" = "configure" \]//g' -e s'/-x "`which update-menus 2> \/dev\/null`"\|-x "`which update-menus 2>\/dev\/null`"/-f usr\/bin\/update-mime-database/g' -e s'/update-menus/update-mime-database usr\/share\/mime \&> \/dev\/null/g' -e s'/dpkg --listfiles\|dpkg -L/pacman -Qql/g' -e s'/ dash / bash /g' tempfile | grep -v '^ \+set -e$' > .INSTALL
|
|
|
|
rm -rf tempfile
|
|
fi
|
|
|
|
# Removing metadata of original .deb package, virtual packages list and aur packages list
|
|
rm -rf control preinst postinst prerm postrm conffiles virtual-packages aur-packages
|
|
|
|
# Prompting user for editing .PKGINFO and .INSTALL files
|
|
if [[ "$1" != "-Q" ]] && [[ "$1" != "--Q" ]] && [[ "$1" != "-Quiet" ]] && [[ "$1" != "--Quiet" ]]; then
|
|
if [ -e .INSTALL ]; then
|
|
echo -en "\n${lightblue}::${NC} ${bold}If you want to edit .PKGINFO and .INSTALL files (in this order), press (1) For${normal} ${lightred}vi${NC} ${bold}(2) For${normal} ${lightred}nano${NC} ${bold}(3) For${normal} ${lightred}a custom editor${NC} ${bold}or any other key to continue: ${normal}"
|
|
read -n 1 number
|
|
if [[ $number == 1 ]]; then
|
|
vi .PKGINFO; vi .INSTALL; echo
|
|
elif [[ $number == 2 ]]; then
|
|
nano .PKGINFO; nano .INSTALL; echo
|
|
elif [[ $number == 3 ]]; then
|
|
echo -en "\n${lightblue}::${NC} ${bold}Enter command for running custom editor: ${normal}"
|
|
read custom_editor
|
|
$custom_editor .PKGINFO; $custom_editor .INSTALL
|
|
else
|
|
echo
|
|
fi
|
|
else
|
|
echo -en "\n${lightblue}::${NC} ${bold}If you want to edit .PKGINFO file, press (1) For${normal} ${lightred}vi${NC} ${bold}(2) For${normal} ${lightred}nano${NC} ${bold}(3) For${normal} ${lightred}a custom editor${NC} ${bold}or any other key to continue: ${normal}"
|
|
read -n 1 number
|
|
if [[ $number == 1 ]]; then
|
|
vi .PKGINFO; echo
|
|
elif [[ $number == 2 ]]; then
|
|
nano .PKGINFO; echo
|
|
elif [[ $number == 3 ]]; then
|
|
echo -en "\n${lightblue}::${NC} ${bold}Enter command for running custom editor: ${normal}"
|
|
read custom_editor
|
|
$custom_editor .PKGINFO
|
|
else
|
|
echo
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
# Generating .MTREE file
|
|
echo -e "\n${lightgreen}==>${NC} ${bold}Generating .MTREE file...${normal}"
|
|
|
|
bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link' * .PKGINFO .INSTALL 2> /dev/null
|
|
|
|
# Creating final package in a fakeroot environment
|
|
echo -e "\n${lightgreen}==>${NC} ${bold}Creating final package...${normal}"
|
|
fakeroot << EOF
|
|
tar --force-local -pcf `grep '^pkgname' .PKGINFO | gawk '{print $3}'`-`grep '^pkgver' .PKGINFO | gawk '{print $3}'`-`grep '^arch' .PKGINFO | gawk '{print $3}'`.pkg.tar * .PKGINFO .INSTALL .MTREE 2> /dev/null
|
|
xz -z -9 *.tar
|
|
EOF
|
|
mv *.xz ../
|
|
cd ..
|
|
|
|
# Removing leftover files
|
|
echo -e "${lightgreen}==>${NC} ${bold}Removing leftover files...${normal}"
|
|
rm -rf "$working_directory"
|
|
rm -rf /tmp/debtap-tmp
|
|
|
|
# Announcement of successful creation of package
|
|
echo -e "${lightgreen}==>${NC} ${bold}Package successfully created!${normal}"
|