summaryrefslogtreecommitdiff
path: root/bundler
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-09-26 16:13:33 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-09-26 16:14:05 -0300
commit3db24d341fd54ab3debd11e28d9ca2ccc28d3b2f (patch)
treef3dd155f71ca5efdb13691863866bdc5d708f209 /bundler
parentcb9c2abb39740757b77eca54f87763818cace546 (diff)
Use textwrap to have nicer multiple-line strings.
Diffstat (limited to 'bundler')
-rw-r--r--bundler/actions.py93
1 files changed, 50 insertions, 43 deletions
diff --git a/bundler/actions.py b/bundler/actions.py
index 3cb4a6b..20d99f5 100644
--- a/bundler/actions.py
+++ b/bundler/actions.py
@@ -4,6 +4,7 @@ import os
import stat
import subprocess
import sys
+import textwrap
import urllib
import zipfile
@@ -367,33 +368,36 @@ class CopyBinaries(Action):
class PLister(Action):
- plist = """<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDisplayName</key>
- <string>Bitmask</string>
- <key>CFBundleExecutable</key>
- <string>MacOS/bitmask-launcher</string>
- <key>CFBundleIconFile</key>
- <string>bitmask.icns</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>Bitmask</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1</string>
- <key>LSBackgroundOnly</key>
- <false/>
- <key>CFBundleIdentifier</key>
- <string>se.leap.bitmask</string>
-</dict>
-</plist>""".split("\n")
-
- qtconf = """[Paths]
-Plugins = PlugIns"""
+ plist = textwrap.dedent("""\
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <plist version="1.0">
+ <dict>
+ <key>CFBundleDisplayName</key>
+ <string>Bitmask</string>
+ <key>CFBundleExecutable</key>
+ <string>MacOS/bitmask-launcher</string>
+ <key>CFBundleIconFile</key>
+ <string>bitmask.icns</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>Bitmask</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1</string>
+ <key>LSBackgroundOnly</key>
+ <false/>
+ <key>CFBundleIdentifier</key>
+ <string>se.leap.bitmask</string>
+ </dict>
+ </plist>""").split("\n")
+
+ qtconf = textwrap.dedent(
+ """\
+ [Paths]
+ Plugins = PlugIns""")
def __init__(self, basedir, skip, do):
Action.__init__(self, "plister", basedir, skip, do)
@@ -431,18 +435,20 @@ class SeededConfig(Action):
class DarwinLauncher(Action):
- launcher = """#!/bin/bash
-#
-# Launcher for the LEAP Client under OSX
-#
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
-export DYLD_LIBRARY_PATH=$DIR/lib
-export PATH=$DIR/../Resources/:$PATH
-# ---------------------------
-# DEBUG Info -- enable this if you
-# are having problems with dynamic libraries loading
-
-cd "${DIR}" && ./Bitmask $1 $2 $3 $4 $5""".split("\n")
+ launcher = textwrap.dedent(
+ """\
+ #!/bin/bash
+ #
+ # Launcher for the LEAP Client under OSX
+ #
+ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
+ export DYLD_LIBRARY_PATH=$DIR/lib
+ export PATH=$DIR/../Resources/:$PATH
+ # ---------------------------
+ # DEBUG Info -- enable this if you
+ # are having problems with dynamic libraries loading
+
+ cd "${DIR}" && ./Bitmask $1 $2 $3 $4 $5""").split("\n")
def __init__(self, basedir, skip, do):
Action.__init__(self, "darwinlauncher", basedir, skip, do)
@@ -483,11 +489,12 @@ class CopyAssets(Action):
class CopyMisc(Action):
- TUF_CONFIG="""[General]
-updater_delay = 60
+ TUF_CONFIG = textwrap.dedent("""\
+ [General]
+ updater_delay = 60
-[Mirror.localhost]
-url_prefix = http://dl.bitmask.net/tuf"""
+ [Mirror.localhost]
+ url_prefix = http://dl.bitmask.net/tuf""")
def __init__(self, basedir, skip, do):
Action.__init__(self, "copymisc", basedir, skip, do)