diff options
author | Lucas C. Villa Real <lucasvr@gmail.com> | 2016-12-08 15:38:19 -0200 |
---|---|---|
committer | Lucas C. Villa Real <lucasvr@gmail.com> | 2016-12-08 15:38:19 -0200 |
commit | f8b870adbfd1bea8f0f296102baac9b5c4c80ea0 (patch) | |
tree | e91f362fbd1ea836144eaa47d27ec303634b5c12 /bin/InstallPackage-RPM | |
parent | 2f58a1322ec3c1adb7936d297df82379f469de0e (diff) | |
download | ThirdPartyInstallers-f8b870adbfd1bea8f0f296102baac9b5c4c80ea0.tar.xz |
New command-line switch: -W/--no-web. When used, the script will not
attempt to search the web for package/dependency name resolution.
Diffstat (limited to 'bin/InstallPackage-RPM')
-rwxr-xr-x | bin/InstallPackage-RPM | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/bin/InstallPackage-RPM b/bin/InstallPackage-RPM index 87c7ca2..50313f0 100755 --- a/bin/InstallPackage-RPM +++ b/bin/InstallPackage-RPM @@ -14,7 +14,8 @@ helpOnNoArguments=yes scriptUsage="<file.rpm>" scriptExample="LibreOffice_5.2.3_Linux_x86-64_rpm" -Add_Option_Entry "l" "symlink" "If symlinks should be created and wether they should be forced on conflicts." "yes" "yes no force" +Add_Option_Entry "l" "symlink" "If symlinks should be created and wether they should be forced on conflicts." "yes" "yes no force" +Add_Option_Boolean "W" "no-web" "Do not search the web to resolve dependencies." Parse_Options "$@" ### Functions ################################################################# @@ -203,14 +204,17 @@ function take_dependency_from_path() { # What we do now is to query remote RPM databases to find which package hosts the # dependency file. - Log_Normal "Searching the remote RPM database for the package hosting $originalpath" - depname=$(RPMFinder --path="$originalpath" --arch="$arch" --distro="$distro") - if [ "$depname" ] + if ! Boolean "no-web" then - # TODO: we could now lookup the GoboLinux recipe store to find whether we - # have it or not - echo "$(GuessProgramCase $depname)" - return 0 + Log_Normal "Searching the remote RPM database for the package hosting $originalpath" + depname=$(RPMFinder --path="$originalpath" --arch="$arch" --distro="$distro") + if [ "$depname" ] + then + # TODO: we could now lookup the GoboLinux recipe store to find whether we + # have it or not + echo "$(GuessProgramCase $depname)" + return 0 + fi fi fi } |