diff --git a/debtap b/debtap index 0e5f8c9..35ea34b 100755 --- a/debtap +++ b/debtap @@ -121,7 +121,7 @@ elif [[ $update == set ]]; then fi fi fi -elif [[ "${@: -1}" == "debtap" ]] || [[ "${@: -1}" =~ /debtap$ ]] || [[ "${@: -1}" =~ ^-(-)?([qQswpP]+)$ ]] || [[ "${@: -1}" =~ ^-(-)?([quiet|Quiet|pseudo|wipeout|pkgbuild|Pkgbuild]){1,}$ ]]; then +elif [[ "${@: -1}" == "debtap" ]] || [[ "${@: -1}" =~ /debtap$ ]] || [[ "${@: -1}" =~ ^-([qQswpP]+)$ ]] || [[ "${@: -1}" =~ ^--([quiet|Quiet|pseudo|wipeout|pkgbuild|Pkgbuild]){1,}$ ]]; then echo -e "${red}Error: You haven't specified a deb package${NC}\nSyntax: debtap [options] package_filename\n\nOptions:\n\n -h --help Print this help message\n -u --update Update debtap database\n -q --quiet Bypass all questions, except for editing metadata file(s)\n -Q --Quiet Bypass all questions (not recommended)\n -s --pseudo Create a pseudo-64-bit package from a 32-bit .deb package\n -w --wipeout Wipeout versions from all dependencies, conflicts etc.\n -p --pkgbuild Additionally generate a PKGBUILD file\n -P --Pkgbuild Generate a PKGBUILD file only\n -v --version Print version"; exit 1 elif [[ "${@: -1}" =~ ^(-)+(.)*$ ]] || [[ $(ls "${@: -1}" &> /dev/null; echo $?) != 0 ]]; then echo -e "${red}Error: No such file or directory or invalid option${NC}"; exit 1 @@ -2792,7 +2792,7 @@ fi # Generating replacements fields if [[ $(grep -q ^Replaces: control; echo $?) == 0 ]]; then - grep ^Replaces: control | sed -e s'/^Replaces: //g' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /> />/g' -e s'/<< /> tempfile01 done @@ -2810,7 +2810,7 @@ fi # Generating conflicts fields if [[ $(grep -q ^Conflicts: control; echo $?) == 0 ]]; then - grep ^Conflicts: control | sed -e s'/^Conflicts: //g' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /> />/g' -e s'/<< /> tempfile01 done @@ -2828,7 +2828,7 @@ fi # Generating provisions fields if [[ $(grep -q ^Provides: control; echo $?) == 0 ]]; then - grep ^Provides: control | sed -e s'/^Provides: //g' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /> />/g' -e s'/<< /> tempfile01 done @@ -2862,7 +2862,7 @@ fi # Generating non optional dependencies fields if [[ $(grep -q '^Depends:\|^Pre-Depends:' control; echo $?) == 0 ]]; then - grep '^Depends:\|^Pre-Depends:' control | sed -e s'/^Depends: \|^Pre-Depends: //g' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /> />/g' -e s'/<< /> tempfile01 done @@ -2880,7 +2880,7 @@ fi # Generating optional dependencies fields if [[ $(grep -q '^Recommends:\|^Suggests:' control; echo $?) == 0 ]]; then - grep '^Recommends:\|^Suggests:' control | sed -e s'/^Recommends: \|^Suggests: //g' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /> />/g' -e s'/<< /> tempfile01 done