Runtime license -> Apache.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/7fb02367 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/7fb02367 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/7fb02367 Branch: refs/heads/master Commit: 7fb02367631eefffbd28a3a016f0c64e1fb5a359 Parents: b221ef8 Author: Marko Kiiskila <ma...@runtime.io> Authored: Thu Feb 11 09:15:36 2016 -0800 Committer: Marko Kiiskila <ma...@runtime.io> Committed: Thu Feb 11 09:15:36 2016 -0800 ---------------------------------------------------------------------- newt/cli/build.go | 32 ++++++++++++++++++-------------- newt/cli/compiler.go | 32 ++++++++++++++++++-------------- newt/cli/deps.go | 19 +++++++++++++++++++ newt/cli/downloader.go | 32 ++++++++++++++++++-------------- newt/cli/image.go | 18 ++++++++++++++++++ newt/cli/pkg.go | 32 ++++++++++++++++++-------------- newt/cli/pkglist.go | 32 ++++++++++++++++++-------------- newt/cli/project.go | 32 ++++++++++++++++++-------------- newt/cli/remoterepo.go | 38 +++++++++++++++++++++----------------- newt/cli/repo.go | 32 ++++++++++++++++++-------------- newt/cli/target.go | 42 +++++++++++++++++++++++------------------- newt/cli/util.go | 32 ++++++++++++++++++-------------- newt/newt.go | 32 ++++++++++++++++++-------------- 13 files changed, 243 insertions(+), 162 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/cli/build.go ---------------------------------------------------------------------- diff --git a/newt/cli/build.go b/newt/cli/build.go index eff2376..67e3139 100644 --- a/newt/cli/build.go +++ b/newt/cli/build.go @@ -1,17 +1,21 @@ -/* - Copyright 2015 Runtime Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package cli http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/cli/compiler.go ---------------------------------------------------------------------- diff --git a/newt/cli/compiler.go b/newt/cli/compiler.go index c5e6926..31f999d 100644 --- a/newt/cli/compiler.go +++ b/newt/cli/compiler.go @@ -1,17 +1,21 @@ -/* - Copyright 2015 Runtime Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package cli http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/cli/deps.go ---------------------------------------------------------------------- diff --git a/newt/cli/deps.go b/newt/cli/deps.go index 72ada66..a4c7069 100644 --- a/newt/cli/deps.go +++ b/newt/cli/deps.go @@ -1,3 +1,22 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package cli import ( http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/cli/downloader.go ---------------------------------------------------------------------- diff --git a/newt/cli/downloader.go b/newt/cli/downloader.go index b743fea..981673b 100644 --- a/newt/cli/downloader.go +++ b/newt/cli/downloader.go @@ -1,17 +1,21 @@ -/* - Copyright 2015 Runtime Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package cli http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/cli/image.go ---------------------------------------------------------------------- diff --git a/newt/cli/image.go b/newt/cli/image.go new file mode 100644 index 0000000..f736fe1 --- /dev/null +++ b/newt/cli/image.go @@ -0,0 +1,18 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/cli/pkg.go ---------------------------------------------------------------------- diff --git a/newt/cli/pkg.go b/newt/cli/pkg.go index d3fe537..d968289 100644 --- a/newt/cli/pkg.go +++ b/newt/cli/pkg.go @@ -1,17 +1,21 @@ -/* - Copyright 2015 Runtime Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package cli http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/cli/pkglist.go ---------------------------------------------------------------------- diff --git a/newt/cli/pkglist.go b/newt/cli/pkglist.go index fd7f811..675b401 100644 --- a/newt/cli/pkglist.go +++ b/newt/cli/pkglist.go @@ -1,17 +1,21 @@ -/* - Copyright 2015 Runtime Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package cli http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/cli/project.go ---------------------------------------------------------------------- diff --git a/newt/cli/project.go b/newt/cli/project.go index 43ae4b6..fe3012e 100644 --- a/newt/cli/project.go +++ b/newt/cli/project.go @@ -1,17 +1,21 @@ -/* - Copyright 2015 Runtime Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package cli http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/cli/remoterepo.go ---------------------------------------------------------------------- diff --git a/newt/cli/remoterepo.go b/newt/cli/remoterepo.go index 56b3dfa..1dadb66 100644 --- a/newt/cli/remoterepo.go +++ b/newt/cli/remoterepo.go @@ -1,17 +1,21 @@ -/* - Copyright 2015 Runtime Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package cli @@ -37,9 +41,9 @@ type RemoteRepo struct { // Allocate a new structure, and initialize it. func NewRemoteRepo(pkgList *PkgList, branch string) (*RemoteRepo, error) { remoteRepo := &RemoteRepo{ - Name : pkgList.Name, + Name: pkgList.Name, RemoteLoc: pkgList.RemoteUrl, - LocalLoc: "", + LocalLoc: "", } err := remoteRepo.Download(branch) @@ -91,7 +95,7 @@ func (remoteRepo *RemoteRepo) Download(branch string) error { func (remoteRepo *RemoteRepo) ResolvePkgName(pkgName string) (*Pkg, error) { if remoteRepo.PkgList == nil { return nil, NewNewtError(fmt.Sprintf("RemoteRepo %s not downloaded yet!", - remoteRepo.Name)) + remoteRepo.Name)) } return remoteRepo.PkgList.ResolvePkgName(pkgName) } http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/cli/repo.go ---------------------------------------------------------------------- diff --git a/newt/cli/repo.go b/newt/cli/repo.go index 45ad5ce..fa7d34e 100644 --- a/newt/cli/repo.go +++ b/newt/cli/repo.go @@ -1,17 +1,21 @@ -/* - Copyright 2015 Runtime Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package cli http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/cli/target.go ---------------------------------------------------------------------- diff --git a/newt/cli/target.go b/newt/cli/target.go index ae04a6d..1b1822e 100644 --- a/newt/cli/target.go +++ b/newt/cli/target.go @@ -1,17 +1,21 @@ -/* - Copyright 2015 Runtime Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package cli @@ -95,7 +99,7 @@ func (t *Target) SetDefaults() error { } t.Identities = map[string]string{} for _, ident := range identities { - StatusMessage(VERBOSITY_VERBOSE, " set default ident %s\n", ident) + StatusMessage(VERBOSITY_VERBOSE, " set default ident %s\n", ident) t.Identities[ident] = t.Name } t.Capabilities, err = parseTargetStringSlice(t.Vars["capabilities"]) @@ -402,7 +406,7 @@ func (t *Target) Remove() error { func (t *Target) binPath() (string, error) { if t.Vars["project"] == "" { - return "", NewNewtError(fmt.Sprintf("No project associated with " + + return "", NewNewtError(fmt.Sprintf("No project associated with "+ "target %s", t.Name)) } p, err := LoadProject(t.Repo, t, t.Vars["project"]) @@ -438,9 +442,9 @@ func (t *Target) Label(versionStr string) error { os.Chdir(t.Repo.BasePath) rsp, err := ShellCommand(fmt.Sprintf("%s %s %s %s", bin2imgPath, - binBaseName + ".elf.bin", binBaseName + ".img", versionStr)) + binBaseName+".elf.bin", binBaseName+".img", versionStr)) if err != nil { - StatusMessage(VERBOSITY_DEFAULT, "%s", rsp); + StatusMessage(VERBOSITY_DEFAULT, "%s", rsp) return err } return nil @@ -483,7 +487,7 @@ func (t *Target) Download() error { rsp, err := ShellCommand(fmt.Sprintf("%s %s %s", downloadScript, binBaseName, identString)) if err != nil { - StatusMessage(VERBOSITY_DEFAULT, "%s", rsp); + StatusMessage(VERBOSITY_DEFAULT, "%s", rsp) return err } http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/cli/util.go ---------------------------------------------------------------------- diff --git a/newt/cli/util.go b/newt/cli/util.go index 9626acf..c49fc39 100644 --- a/newt/cli/util.go +++ b/newt/cli/util.go @@ -1,17 +1,21 @@ -/* - Copyright 2015 Runtime Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package cli http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7fb02367/newt/newt.go ---------------------------------------------------------------------- diff --git a/newt/newt.go b/newt/newt.go index 7a41e42..268d823 100644 --- a/newt/newt.go +++ b/newt/newt.go @@ -1,17 +1,21 @@ -/* - Copyright 2015 Runtime Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package main