 // MARK: Self
 
 extension SelfCommands {
-    struct Install: Command {
-        static let id = "install"
-
-        static func execute(with args: [String], in directory: String) {
-            do {
-                try run("mv \(directory) /usr/local/bin/vapor")
-                print("Vapor CLI installed.")
-            } catch {
-                print("Trying with sudo.")
-                do {
-                    try run("sudo mv \(directory) /usr/local/bin/vapor")
-                    print("Vapor CLI installed.")
-                } catch {
-                    fail("Could not move Vapor CLI to install location.")
-                }
-            }
-        }
-
-        static var help: [String] {
-            return [
-                "Moves the CLI into the bin so",
-                "that it is available in the PATH"
-            ]
-        }
-    }
+    static func install(from: String, to: String) throws {
+        do {
+            try run("chmod +x \(from)")
+            try run("mv \(from) \(to)")
+        } catch {
+            try run("sudo mv \(from) \(to)")
+        }
+    }
+
 }
 
 extension SelfCommands {

        static let id = "update"

        static func execute(with args: [String], in directory: String) {
            let name = "vapor-cli.tmp"
            let quiet = args.contains("--verbose") ? "" : "-s"


struct SelfCommands: Command {
    static let id = "self"

    static var pathToSelf: String? {
        if let path = Process.arguments.first {
            if path == "vapor" {
                return try? runWithOutput("which vapor").trim()
            } else {
                return path
            }
        }
        return nil
    }

    static func isCompiled(path: String) -> Bool {
        let cmd = "file \(path) | grep 'text executable' > /dev/null 2>&1"
        return system(cmd) != 0
    }

    static var subCommands: [Command.Type] = [
        SelfCommands.Update.self,
        SelfCommands.Compile.self
    ]

    static func execute(with args: [String], in directory: String) {
