add luci-auth-ssh-* entrypoints

Add entrypoints to luci-auth-ssh-* executables to fetch cipd packages
then run the binary.

Bug:b/435528916
Change-Id: Ic39b104d0ade8a65950fbbb755fa21c0b6514bb7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6864760
Auto-Submit: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Chenlin Fan <fancl@chromium.org>
Commit-Queue: Chenlin Fan <fancl@chromium.org>
This commit is contained in:
Jiewei Qian
2025-08-19 23:29:32 -07:00
committed by LUCI CQ
parent a582776533
commit fad3730e80
4 changed files with 58 additions and 0 deletions

20
luci-auth-ssh-helper Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Copyright 2025 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# See revert instructions in cipd_manifest.txt
# In git bash on Windows, invoke the batch file.
if [ "$(expr "$(uname -s)" : "^MINGW64_NT")" == "10" ]; then
luci-auth-ssh-helper.bat "$@"
exit
fi
MYPATH=$(dirname "${BASH_SOURCE[0]}")
source "$MYPATH/cipd_bin_setup.sh"
CIPD_ROOT=$(cipd_bin_setup) &> /dev/null
exec "$CIPD_ROOT/luci-auth-ssh-helper" "$@"

9
luci-auth-ssh-helper.bat Normal file
View File

@@ -0,0 +1,9 @@
@echo off
:: Copyright 2025 The Chromium Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.
:: See revert instructions in cipd_manifest.txt
call "%~dp0\cipd_bin_setup.bat" > nul 2>&1
"%~dp0\.cipd_bin\luci-auth-ssh-helper.exe" %*

20
luci-auth-ssh-plugin Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Copyright 2025 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# See revert instructions in cipd_manifest.txt
# In git bash on Windows, invoke the batch file.
if [ "$(expr "$(uname -s)" : "^MINGW64_NT")" == "10" ]; then
luci-auth-ssh-plugin.bat "$@"
exit
fi
MYPATH=$(dirname "${BASH_SOURCE[0]}")
source "$MYPATH/cipd_bin_setup.sh"
CIPD_ROOT=$(cipd_bin_setup) &> /dev/null
exec "$CIPD_ROOT/luci-auth-ssh-plugin" "$@"

9
luci-auth-ssh-plugin.bat Normal file
View File

@@ -0,0 +1,9 @@
@echo off
:: Copyright 2025 The Chromium Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.
:: See revert instructions in cipd_manifest.txt
call "%~dp0\cipd_bin_setup.bat" > nul 2>&1
"%~dp0\.cipd_bin\luci-auth-ssh-plugin.exe" %*