aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas C. Villa Real <lucasvr@gmail.com>2017-10-12 11:17:49 -0300
committerLucas C. Villa Real <lucasvr@gmail.com>2017-10-12 11:17:49 -0300
commit2df33657c0670bd1b6b3177a04cb71e15d02fcdd (patch)
tree64e07e553a1e7ea6ff0992924c692eb7e9d45268
parentb654cf1c6844f9dfae09696f7dcb2328abf2715b (diff)
downloadThirdPartyInstallers-2df33657c0670bd1b6b3177a04cb71e15d02fcdd.tar.xz
Fixes a misspell
-rwxr-xr-xbin/ThirdPartyInstaller12
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/ThirdPartyInstaller b/bin/ThirdPartyInstaller
index 84d2729..707f6e3 100755
--- a/bin/ThirdPartyInstaller
+++ b/bin/ThirdPartyInstaller
@@ -16,7 +16,7 @@ scriptExample="xispita-2.0.3-1.x86_64.rpm"
Add_Option_Entry "n" "app-name" "Override program name"
Add_Option_Entry "e" "version-number" "Override program version number"
-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 whether 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 "$@"
@@ -122,13 +122,23 @@ function flatten_package() {
realpath ./opt/*/* | sed "s,$(realpath $PWD),,g" >> Resources/UnmanagedFiles
}
+ function remove_links_to_opt() {
+ local fromdir="$1"
+ find "$fromdir/bin" "$fromdir/sbin" -type l 2> /dev/null | while read symlink
+ do
+ readlink -f "$symlink" | grep -q "/opt/" && rm ${verbose} -f "$symlink"
+ done
+ }
+
if [ -d "./usr" ]
then
+ remove_links_to_opt "./usr"
cp ${verbose} -a ./usr/* .
rm -rf -- ./usr
fi
if [ -d "./local" ]
then
+ remove_links_to_opt "./local"
cp ${verbose} -a ./local/* .
rm -rf -- ./local
fi