installKite moves the .kite bundle into ~/kd/kites.
(bundlePath, repoName, version string)
| 263 | |
| 264 | // installKite moves the .kite bundle into ~/kd/kites. |
| 265 | func installKite(bundlePath, repoName, version string) error { |
| 266 | kiteHome, err := kitekey.KiteHome() |
| 267 | if err != nil { |
| 268 | return err |
| 269 | } |
| 270 | |
| 271 | kitesPath := filepath.Join(kiteHome, "kites") |
| 272 | repoPath := filepath.Join(kitesPath, repoName) |
| 273 | versionPath := filepath.Join(repoPath, version) |
| 274 | |
| 275 | os.MkdirAll(repoPath, 0700) |
| 276 | return os.Rename(bundlePath, versionPath) |
| 277 | } |
| 278 | |
| 279 | // isBinaryFile returns true if the path is the path of the binary file |
| 280 | // in application bundle. Example: fs-0.0.1.kite/bin/fs |