@@ -205,16 +205,20 @@ def verify_sketch(path)
205
205
def install_local_library ( library_path )
206
206
library_name = File . basename ( library_path )
207
207
destination_path = File . join ( @installation . lib_dir , library_name )
208
+ puts "want to get library at '#{ library_path } ' to '#{ destination_path } "
208
209
209
210
# things get weird if the sketchbook contains the library.
210
211
# check that first
211
212
if File . exist? destination_path
212
213
uhoh = "There is already a library '#{ library_name } ' in the library directory"
214
+ puts uhoh
213
215
return destination_path if destination_path == library_path
214
216
215
217
# maybe it's a symlink? that would be OK
216
218
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
218
222
puts "#{ uhoh } and it's not symlinked to #{ library_path } "
219
223
return nil
220
224
end
@@ -224,7 +228,14 @@ def install_local_library(library_path)
224
228
end
225
229
226
230
# install the library
231
+ puts "linking src '#{ library_path } ' to dest '#{ destination_path } "
227
232
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 } `
228
239
destination_path
229
240
end
230
241
0 commit comments