diff --git a/lib/package/handler.fy b/lib/package/handler.fy index 1b209be4..055964c7 100644 --- a/lib/package/handler.fy +++ b/lib/package/handler.fy @@ -52,5 +52,11 @@ class Fancy Package { def bin_path { @install_path + "/bin" } + + def installed_bin_symlinks: spec { + spec bin_files map: |bf| { + "#{bin_path}/#{File basename(bf)}" + } + } } } \ No newline at end of file diff --git a/lib/package/uninstaller.fy b/lib/package/uninstaller.fy index 6c902967..10d9ee7b 100644 --- a/lib/package/uninstaller.fy +++ b/lib/package/uninstaller.fy @@ -9,6 +9,7 @@ class Fancy Package { Specification delete_specification: spec from: $ Fancy Package package_list_file delete_package_dir delete_lib_file: (spec package_name) + delete_bin_files: (installed_bin_symlinks: spec) "Successfully uninstalled package #{spec package_name} with version: #{spec version}." println } else: { System abort: "No package found for #{@package_name} with version '#{@version}'." @@ -28,5 +29,11 @@ class Fancy Package { "Deleting: #{lib_file}" println File delete!: lib_file } + + def delete_bin_files: bin_files { + bin_files each: |bf| { + File delete!: bf + } + } } }