Commit Graph

26 Commits

Author SHA1 Message Date
Arne Zachlod
b5ab6d0bc5 scripts/env: fix env for git conf init.defaultBranch not set to "master"
Since version 2.28, git has a config option init.defaultBranch to set the name
of the first branch created with git init. The env script expects this name to
be "master". This commit sets the initial branch name to "master"
instead of using the git configured one.

Signed-off-by: Arne Zachlod <arne@nerdkeller.org>
2021-11-13 10:29:41 -10:00
Kevin Darbyshire-Bryant
8242c6de29 scripts/env: Fix 56f813674a scripts/env: use command -v instead of which
We don't need to see how git will be executed and it produces non silent
output on 'scripts/env diff' commands when there are no differences
unlike before.

Re-introduce original silent behaviour.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2020-07-12 13:29:28 +01:00
Petr Štetiar
227e47b3ca scripts/env: fix remaining shellcheck warning
Fixes following shellcheck warning:

 In scripts/env line 25:
 	exit ${1:-1}
             ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-07-11 13:33:28 +02:00
Rosen Penev
5b7cace9e3 scripts/env: use read -r instead of read
read mangles backslashes.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-11 13:33:28 +02:00
Rosen Penev
f80a540dbf scripts/env: exit in case of failure to cd
Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-11 13:33:28 +02:00
Rosen Penev
e68810ba53 scripts/env: replace \! with !
The latter is more standard. The former throws an error under
shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-11 13:33:28 +02:00
Rosen Penev
56f813674a scripts/env: use command -v instead of which
Simpler and built in to the shell.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-11 13:33:28 +02:00
Rosen Penev
995378a2a5 scripts/env: replace -a and -o with &&/||
The former are not well defined.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-01-02 23:56:19 +01:00
Rosen Penev
2fe5319d58 scripts/env: use explicit find location
Some find binaries do not imply the current directory.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-01-02 23:51:45 +01:00
Philip Prindeville
e495a05069 env: only use color diffs on terminals
When sending script/env diff's output to a file or pipeline, you
don't want escape characters for ANSI color sequences fouling the
byte stream.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-05-05 09:44:43 +02:00
Jo-Philipp Wich
f2277a967d env: allow passing a commit message on save
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 45592
2015-05-01 17:23:15 +00:00
Felix Fietkau
dcb5d00875 scripts: unset GREP_OPTIONS in env and feeds (fixes #16924)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41407
2014-06-30 06:50:22 +00:00
Florian Fainelli
e50315d61c env: colorize git output
SVN-Revision: 30602
2012-02-16 19:24:34 +00:00
Felix Fietkau
a97304cf61 scripts/env: improve the wording of the question when starting repository (patch by Rolf Leggewie)
SVN-Revision: 29262
2011-11-19 17:15:53 +00:00
Felix Fietkau
6b929e2687 scripts/env: make mv and cp operations more robust (treat dotfiles appropriately) (based on patch by Rolf Leggewie)
SVN-Revision: 29261
2011-11-19 17:15:50 +00:00
Felix Fietkau
b9eb659364 scripts/env: fix indentation (patch by Rolf Leggewie)
SVN-Revision: 29260
2011-11-19 17:15:45 +00:00
John Crispin
e42e2b3e9c path expansion was broken due to a badly quoted *
Signed-of-by: Benjamin Cama <benoar@dolka.fr>

SVN-Revision: 26391
2011-04-01 11:07:27 +00:00
Felix Fietkau
0e1337ea47 scripts/env: fix initialization of files/ when creating a new environment (patch from #7603)
SVN-Revision: 22336
2010-07-21 17:49:52 +00:00
Felix Fietkau
02052624df scripts/env: fix file syncing on env switch
SVN-Revision: 12925
2008-10-08 19:15:26 +00:00
Lars-Peter Clausen
5ac7398565 Restore config after running scripts/env diff.
SVN-Revision: 12632
2008-09-18 20:45:12 +00:00
Felix Fietkau
973d7e80d7 fix ./scripts/env for newer git versions
SVN-Revision: 12502
2008-09-02 15:48:40 +00:00
Felix Fietkau
1063f8d415 fix ./scripts/env delete
SVN-Revision: 12399
2008-08-27 14:13:47 +00:00
Felix Fietkau
2311fc9850 replace the deprecated git-* command calls with git *
SVN-Revision: 12379
2008-08-24 13:40:21 +00:00
Felix Fietkau
1391134579 and another one
SVN-Revision: 12217
2008-08-06 16:14:53 +00:00
Felix Fietkau
88b0d6785e fix a small typo
SVN-Revision: 12216
2008-08-06 16:13:38 +00:00
Felix Fietkau
131ba6fed7 add script for managing 'build environments' (.config+files/), including documentation
SVN-Revision: 12212
2008-08-06 14:30:46 +00:00