Ruby: Apple Shake - Report FileIn Nodes
Another quick and dirty script I wrote when I screwed up my media's filesystem and I had to put it back together and this script simply prints out (nicely) the location of the files of every FileIn node in the Shake script.
#! /usr/bin/env ruby $SOURCE = "" # Where are the Shake scripts? $FILE_LIST = %x| ls #{$SOURCE}*.shk |.split("\n") $FILE_LIST.each do |f| filein_nodes = File.open(f).grep(/SFileIn/) puts " --------- #{f} ------------" filein_nodes.map! { |n| n.split(/SFileIn/).last } filein_nodes.each { |n| puts n } puts "\n\n" end