Skip to content

Commit

Permalink
Merge branch 'tiger-issues'
Browse files Browse the repository at this point in the history
  • Loading branch information
mattprice committed Oct 3, 2009
2 parents 81343bf + 625c26a commit a556c28
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 0 additions & 2 deletions Controller.h
Expand Up @@ -71,8 +71,6 @@
- (void)downloadShowListDidFinish: (NSNotification *)notification;

// Setters/getters
- (NSArray *)qualities;
- (void)setQualities: (NSArray *)someQualities;
- (NSDictionary *)shows;
- (void)setShows: (NSDictionary *)someShows;
- (NSArray *)details;
Expand Down
8 changes: 4 additions & 4 deletions Helper.m
Expand Up @@ -146,15 +146,15 @@ - (id) init {
[self chmodFolderAtPath:launchAgentsFolder];

// Remove scriptFolder if we have a newer version to install
if ( [fm fileExistsAtPath:scriptPath] ) {
if ([fm fileExistsAtPath:scriptPath]) {
NSString *scriptVersion = [[NSUserDefaults standardUserDefaults] objectForKey:@"ScriptVersion"];
if ( !scriptVersion || NSOrderedAscending == [scriptVersion compare:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] options:NSNumericSearch] )
if ( ![fm removeFileAtPath:scriptFolder handler:nil] )
if (!scriptVersion || [scriptVersion compare:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] options:NSCaseInsensitiveSearch] )
if (![fm removeFileAtPath:scriptFolder handler:nil])
[Helper dieWithErrorMessage:@"Could not remove the TVShows script folder in the Application Support folder in order to install the new one."];
}

// Install the script in the Application Support folder
if ( ![fm fileExistsAtPath:scriptFolder] ) {
if (![fm fileExistsAtPath:scriptFolder]) {
if ( ![fm copyPath:resourcesScriptFolder toPath:scriptFolder handler:nil] ) {
[Helper dieWithErrorMessage:@"Could not copy the TVShows script in the Application Support folder."];
} else {
Expand Down
2 changes: 1 addition & 1 deletion Info.plist
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<string>${CURRENT_BUNDLE_SHORT}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
8 changes: 6 additions & 2 deletions TVShows.xcodeproj/project.pbxproj
Expand Up @@ -274,7 +274,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /usr/bin/ruby;
shellScript = "if ENV[\"CONFIGURATION\"] == \"Release\" then\n\tfolder = \"#{ENV[\"TARGET_BUILD_DIR\"]}\"\n\tfile = \"#{ENV[\"TARGET_NAME\"]}_#{ENV[\"CURRENT_PROJECT_VERSION\"]}.zip\"\n\tappname = \"#{ENV[\"TARGET_NAME\"]}_#{ENV[\"CURRENT_PROJECT_VERSION\"]}\"\n\tpath = File.join(folder,file)\n#\t`mv \"#{folder}/TVShows\" ~/.Trash`\n#\t`mv #{folder}/*.zip ~/.Trash`\n#\t`mv #{folder}/appcast.xml ~/.Trash`\n\t`mkdir \"#{folder}/#{appname}\"`\n\t`cp \"#{File.join(ENV[\"PROJECT_DIR\"],\"..\",\"utils\",\"uninstall.sh\")}\" \"#{folder}/#{appname}\"`\n\t`mv \"#{folder}/#{ENV[\"FULL_PRODUCT_NAME\"]}\" \"#{folder}/#{appname}\"`\n\t`cd \"#{folder}\" && zip -qr \"#{file}\" #{appname}`\n\tkey = `openssl dgst -sha1 -binary < \"#{path}\" | openssl dgst -dss1 -sign \"#{File.join(\"#{ENV[\"PROJECT_DIR\"]}\",\"..\",\"appcast\",\"dsa_priv.pem\")}\" | openssl enc -base64`\n\tkey = key.split(\"\\n\").first\n\tFile.open(\"#{folder}/appcast.xml\", \"w\") { |f|\n\t\tf << \"<item>\\n\"\n\t\tf << \"\\t<title>TVShows #{ENV[\"CURRENT_PROJECT_VERSION\"]}</title>\\n\"\n\t\tf << \"\\t<pubDate>#{Time.now}</pubDate>\\n\"\n\t\tf << \"\\t<enclosure sparkle:version=\\\"#{ENV[\"CURRENT_PROJECT_VERSION\"]}\\\" sparkle:dsaSignature=\\\"#{key}\\\" url=\\\"http://deathtobunnies.com/tvshows/releases/#{file}\\\" length=\\\"#{File.size(path)}\\\" type=\\\"application/octet-stream\\\"/>\\n\"\n\t\tf << \"\\t<description><![CDATA[<h3 style=\\\"font-weight:bold;\\\">TVShows #{ENV[\"CURRENT_PROJECT_VERSION\"]}</h3>\\n\"\n\t\tf << \"\\t\\t<br />\\n\"\n\t\tf << \"\\t\\t<h3>Changes:</h3>\\n\"\n\t\tf << \"\\t\\t<ul>\\n\"\n\t\tf << \"\\t\\t\\t<li></li>\\n\"\n\t\tf << \"\\t\\t\\t<li></li>\\n\"\n\t\tf << \"\\t\\t\\t<li></li>\\n\"\n\t\tf << \"\\t\\t</ul>\\n\\t]]></description>\\n\"\n\t\tf << \"</item>\"\n\t}\nend\n\n";
shellScript = "if ENV[\"CONFIGURATION\"] == \"Release\" then\n\tfolder = \"#{ENV[\"TARGET_BUILD_DIR\"]}\"\n\tfile = \"#{ENV[\"TARGET_NAME\"]}_#{ENV[\"CURRENT_BUNDLE_SHORT\"]}.zip\"\n\tappname = \"#{ENV[\"TARGET_NAME\"]}_#{ENV[\"CURRENT_BUNDLE_SHORT\"]}\"\n\tpath = File.join(folder,file)\n#\t`mv \"#{folder}/TVShows\" ~/.Trash`\n#\t`mv #{folder}/*.zip ~/.Trash`\n#\t`mv #{folder}/appcast.xml ~/.Trash`\n\t`mkdir \"#{folder}/#{appname}\"`\n\t`cp \"#{File.join(ENV[\"PROJECT_DIR\"],\"..\",\"utils\",\"uninstall.sh\")}\" \"#{folder}/#{appname}\"`\n\t`mv \"#{folder}/#{ENV[\"FULL_PRODUCT_NAME\"]}\" \"#{folder}/#{appname}\"`\n\t`cd \"#{folder}\" && zip -qr \"#{file}\" #{appname}`\n\tkey = `openssl dgst -sha1 -binary < \"#{path}\" | openssl dgst -dss1 -sign \"#{File.join(\"#{ENV[\"PROJECT_DIR\"]}\",\"..\",\"appcast\",\"dsa_priv.pem\")}\" | openssl enc -base64`\n\tkey = key.split(\"\\n\").first\n\tFile.open(\"#{folder}/appcast.xml\", \"w\") { |f|\n\t\tf << \"<item>\\n\"\n\t\tf << \"\\t<title>TVShows #{ENV[\"CURRENT_BUNDLE_SHORT\"]}</title>\\n\"\n\t\tf << \"\\t<pubDate>#{Time.now}</pubDate>\\n\"\n\t\tf << \"\\t<enclosure sparkle:version=\\\"#{ENV[\"CURRENT_PROJECT_VERSION\"]}\\\" sparkle:shortVersionString=\\\"#{ENV[\"CURRENT_BUNDLE_SHORT\"]}\\\" sparkle:dsaSignature=\\\"#{key}\\\" url=\\\"http://deathtobunnies.com/tvshows/releases/#{file}\\\" length=\\\"#{File.size(path)}\\\" type=\\\"application/octet-stream\\\"/>\\n\"\n\t\tf << \"\\t<description><![CDATA[<h3 style=\\\"font-weight:bold;\\\">TVShows #{ENV[\"CURRENT_BUNDLE_SHORT\"]}</h3>\\n\"\n\t\tf << \"\\t\\t<br />\\n\"\n\t\tf << \"\\t\\t<h3>Changes:</h3>\\n\"\n\t\tf << \"\\t\\t<ul>\\n\"\n\t\tf << \"\\t\\t\\t<li></li>\\n\"\n\t\tf << \"\\t\\t\\t<li></li>\\n\"\n\t\tf << \"\\t\\t\\t<li></li>\\n\"\n\t\tf << \"\\t\\t</ul>\\n\\t]]></description>\\n\"\n\t\tf << \"</item>\"\n\t}\nend";
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -386,25 +386,29 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CURRENT_BUNDLE_SHORT = 0.4.3b;
CURRENT_PROJECT_VERSION = 0.4.2;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IBC_STRIP_NIBS = NO;
PREBINDING = NO;
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CURRENT_BUNDLE_SHORT = 0.4.3b;
CURRENT_PROJECT_VERSION = 0.4.2;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IBC_STRIP_NIBS = NO;
IBC_STRIP_NIBS = YES;
PREBINDING = NO;
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion TVShowsScript/TVShows.rb
Expand Up @@ -51,7 +51,7 @@ class Episode

def initialize(show,torrentURL,publishedTime)
@show = show
@torrentURL = URI.encode(torrentURL,"[]")
@torrentURL = torrentURL.gsub(/\[/, '%5B').gsub(/\]/, '%5D')
@publishedTime = publishedTime
end

Expand Down

0 comments on commit a556c28

Please sign in to comment.