summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/rsc/mkapp
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-05-12 23:56:07 -0400
committerChristopher Speller <crspeller@gmail.com>2016-05-12 23:56:07 -0400
commit38ee83e45b4de7edf89bf9f0ef629eb4c6ad0fa8 (patch)
treea4fde09672192b97d453ad605b030bd5a10c5a45 /vendor/github.com/mattermost/rsc/mkapp
parent84d2482ddbff9564c9ad75b2d30af66e3ddfd44d (diff)
downloadchat-38ee83e45b4de7edf89bf9f0ef629eb4c6ad0fa8.tar.gz
chat-38ee83e45b4de7edf89bf9f0ef629eb4c6ad0fa8.tar.bz2
chat-38ee83e45b4de7edf89bf9f0ef629eb4c6ad0fa8.zip
Moving to glide
Diffstat (limited to 'vendor/github.com/mattermost/rsc/mkapp')
-rwxr-xr-xvendor/github.com/mattermost/rsc/mkapp51
1 files changed, 51 insertions, 0 deletions
diff --git a/vendor/github.com/mattermost/rsc/mkapp b/vendor/github.com/mattermost/rsc/mkapp
new file mode 100755
index 000000000..1a52931f1
--- /dev/null
+++ b/vendor/github.com/mattermost/rsc/mkapp
@@ -0,0 +1,51 @@
+#!/bin/bash
+# Copyright 2012 The Go Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+# Run this script in your app root directory, the one containing
+# the app.yaml file. Then point appcfg.py or dev_appserver.py
+# at './tmp' instead of '.'.
+#
+# It creates a symlink forest in a subdirectory named 'tmp' that
+# includes all the files from packages under your app root as
+# well as any packages from your $GOPATH that are needed by
+# the app packages. This makes deployment to App Engine
+# bring in just the packages you need, without manual chasing
+# of dependencies. Perhaps some day appcfg.py and dev_appserver.py
+# will work this way by default.
+
+set -e
+rm -rf tmp
+dirs=$(find . -type d)
+mkdir tmp
+
+for i in *
+do
+ case "$i" in
+ tmp | *.go)
+ ;;
+ *)
+ ln -s ../$i tmp/$i
+ esac
+done
+
+# Like App Engine
+export GOOS=linux
+export GOARCH=amd64
+
+mkdir tmp/_go_top
+cp $(go list -f '{{range .GoFiles}}{{.}} {{end}}') tmp/_go_top
+
+dirs=$(go list -e -f '{{if not .Standard}}{{.ImportPath}} {{end}}' $(go list -f '{{range .Deps}}{{.}} {{end}}' $dirs))
+for import in $dirs
+do
+ case "$import" in
+ appengine | appengine/*)
+ ;;
+ *)
+ mkdir -p tmp/$import
+ files=$(go list -f '{{range .GoFiles}}{{$.Dir}}/{{.}} {{end}}' $import)
+ ln -s $files tmp/$import 2>&1 | grep -v 'is a directory' || true # ignore subdirectory warnings
+ esac
+done