diff --git a/scripts/_common.sh b/scripts/_common.sh index 903f49b..3041761 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -21,10 +21,15 @@ then mkdir "$install_dir/searxng-src" endif git clone -n "$repo_fullpath" "$install_dir/searxng-src" 2>&1 -pushd "$install_dir/searxng-src" - git checkout "$commit_sha" 2>&1 -popd EOF + + # Checkout commit + pushd "$install_dir/searxng-src" + sudo -i -u $app bash << EOF + cd "$install_dir/searxng-src" + git checkout "$commit_sha" 2>&1 +EOF + popd } myynh_install_searxng () {