@@ -205,16 +205,20 @@ def verify_sketch(path)
205205 def install_local_library ( library_path )
206206 library_name = File . basename ( library_path )
207207 destination_path = File . join ( @installation . lib_dir , library_name )
208+ puts "want to get library at '#{ library_path } ' to '#{ destination_path } "
208209
209210 # things get weird if the sketchbook contains the library.
210211 # check that first
211212 if File . exist? destination_path
212213 uhoh = "There is already a library '#{ library_name } ' in the library directory"
214+ puts uhoh
213215 return destination_path if destination_path == library_path
214216
215217 # maybe it's a symlink? that would be OK
216218 if File . symlink? ( destination_path )
217- return destination_path if File . readlink ( destination_path ) == library_path
219+ link_to = File . readlink ( destination_path )
220+ puts " and it's a symlink to '#{ link_to } '"
221+ return destination_path if link_to == library_path
218222 puts "#{ uhoh } and it's not symlinked to #{ library_path } "
219223 return nil
220224 end
@@ -224,7 +228,14 @@ def install_local_library(library_path)
224228 end
225229
226230 # install the library
231+ puts "linking src '#{ library_path } ' to dest '#{ destination_path } "
227232 FileUtils . ln_s ( library_path , destination_path )
233+ puts "find #{ @installation . lib_dir } -type d:"
234+ puts `find #{ @installation . lib_dir } -type d`
235+ puts "find #{ destination_path } :"
236+ puts `find #{ destination_path } `
237+ puts "ls -l #{ destination_path } "
238+ puts `ls -l #{ destination_path } `
228239 destination_path
229240 end
230241
0 commit comments