1
0

依赖filezilla

This commit is contained in:
Sense T 2025-03-10 09:48:10 +08:00
parent 4b202699de
commit 119b75d1e1
2 changed files with 6 additions and 6 deletions

View File

@ -39,10 +39,7 @@ elif [ "$APP" == "filezilla" ]; then
PORT_NUM=$(echo $ARGS | jq -r .Port) PORT_NUM=$(echo $ARGS | jq -r .Port)
USERNAME=$(echo $ARGS | jq -r .User) USERNAME=$(echo $ARGS | jq -r .User)
PASSWORD=$(echo $ARGS | jq -r .PWD) PASSWORD=$(echo $ARGS | jq -r .PWD)
filezilla "sftp://$USERNAME:$PASSWORD@$HOSTNAME:$PORT_NUM"
filebinary=$(which org.filezillaproject.Filezilla || which filezilla )
"$filebinary" "sftp://$USERNAME:$PASSWORD@$HOSTNAME:$PORT_NUM"
else else
echo "Unsupported app." echo "Unsupported app."
sleep 5 sleep 5

View File

@ -8,6 +8,7 @@
openssh, openssh,
which, which,
xdg-terminal-exec, xdg-terminal-exec,
filezilla,
... ...
}: }:
let let
@ -25,6 +26,8 @@ stdenv.mkDerivation rec {
coreutils coreutils
openssh openssh
xdg-terminal-exec xdg-terminal-exec
filezilla
which
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
@ -36,13 +39,13 @@ stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
sed "/^export PATH=/s|@PATH|${coreutils}/bin:${jq}/bin:${passh}/bin:${zlib-ng.bin}/bin:${openssh}/bin:${xdg-terminal-exec}/bin|" "${bin}" > $out/bin/${pname} sed "/^export PATH=/s|@PATH|${which}/bin:${coreutils}/bin:${jq}/bin:${passh}/bin:${zlib-ng.bin}/bin:${openssh}/bin:${xdg-terminal-exec}/bin:${filezilla}/bin|" "${bin}" > $out/bin/${pname}
chmod +x $out/bin/${pname} chmod +x $out/bin/${pname}
mkdir -p $out/share/applications mkdir -p $out/share/applications
cat "${desktop}" | sed "/^Exec=/s|@EXEC|$out/bin/${pname}|" > "$out/share/applications/${pname}.desktop" cat "${desktop}" | sed "/^Exec=/s|@EXEC|$out/bin/${pname}|" > "$out/share/applications/${pname}.desktop"
echo "PATH: $PATH" echo "PATH: $PATH"
which jq && which minideflate && which passh && which ssh && which xdg-terminal-exec || exit 1 which which && which jq && which minideflate && which passh && which ssh && which xdg-terminal-exec || exit 1
''; '';
} }