[OpenWrt-Devel] [PATCH 1/5] scripts/env: use explicit find location

Rosen Penev rosenp at gmail.com
Tue Dec 31 21:01:42 EST 2019


Some find binaries do not imply the current directory.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/env b/scripts/env
index 69b63895b4..fd49e1c817 100755
--- a/scripts/env
+++ b/scripts/env
@@ -136,7 +136,7 @@ env_clear() {
 	env_init
 	[ -L "$BASEDIR/.config" ] && rm -f "$BASEDIR/.config"
 	[ -L "$BASEDIR/files" ] && rm -f "$BASEDIR/files"
-	[ -f "$ENVDIR/.config" ] || ( cd "$ENVDIR/files" && find | grep -vE '^\.$' > /dev/null )
+	[ -f "$ENVDIR/.config" ] || ( cd "$ENVDIR/files" && find . | grep -vE '^\.$' > /dev/null )
 	env_sync_data
 	if ask_bool 1 "Do you want to keep your current config and files"; then
 		mkdir -p "$BASEDIR/files"
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list