diff options
author | Maciej Barć <xgqt@gentoo.org> | 2024-01-23 22:48:44 +0100 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2024-01-23 23:06:57 +0100 |
commit | 4b242137c900295e5b0b06cb29f583c997c01625 (patch) | |
tree | edad736f57b364306c00e62679157b39d7755b17 /app-shells | |
parent | app-containers/devcontainer: bump to 0.56.1 (diff) | |
download | gentoo-4b242137c900295e5b0b06cb29f583c997c01625.tar.gz gentoo-4b242137c900295e5b0b06cb29f583c997c01625.tar.bz2 gentoo-4b242137c900295e5b0b06cb29f583c997c01625.zip |
app-shells/pwsh: format pwsh-7.3.3-copy-ref.fsx
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'app-shells')
-rw-r--r-- | app-shells/pwsh/files/pwsh-7.3.3-copy-ref.fsx | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/app-shells/pwsh/files/pwsh-7.3.3-copy-ref.fsx b/app-shells/pwsh/files/pwsh-7.3.3-copy-ref.fsx index eb33fc4884dc..127d6eb9444b 100644 --- a/app-shells/pwsh/files/pwsh-7.3.3-copy-ref.fsx +++ b/app-shells/pwsh/files/pwsh-7.3.3-copy-ref.fsx @@ -1,43 +1,30 @@ -// Copyright 1999-2023 Gentoo Authors +// Copyright 1999-2024 Gentoo Authors // Distributed under the terms of the GNU General Public License v2 - open System.IO open System.Runtime.InteropServices +let args = fsi.CommandLineArgs |> Array.tail -let args = - fsi.CommandLineArgs |> Array.tail - - -let wanted_directory = - System.IO.Path.GetFullPath args.[0] - -printfn $" * Wanted directory: {wanted_directory}" +let wantedDirectory = System.IO.Path.GetFullPath args.[0] -System.IO.Directory.CreateDirectory wanted_directory +printfn $" * Wanted directory: {wantedDirectory}" +System.IO.Directory.CreateDirectory wantedDirectory -let runtime_directory = - RuntimeEnvironment.GetRuntimeDirectory () +let runtimeDirectory = RuntimeEnvironment.GetRuntimeDirectory() -printfn $" * Runtime directory: {runtime_directory}" +printfn $" * Runtime directory: {runtimeDirectory}" - -let runtime_files = - System.IO.Directory.GetFiles runtime_directory +let runtimeFiles = + System.IO.Directory.GetFiles runtimeDirectory |> Array.filter (fun s -> s.EndsWith ".dll") |> Array.sort -printfn $" * Copying {runtime_files.Length} files" - - -for runtime_file in runtime_files do - let runtime_file_name = - System.IO.Path.GetFileName runtime_file +printfn $" * Copying {runtimeFiles.Length} files into {wantedDirectory}" - let wanted_runtime_file = - System.IO.Path.Join(wanted_directory, runtime_file_name) +for runtime_file in runtimeFiles do + let runtimeFileName = System.IO.Path.GetFileName runtime_file + let wantedRuntimeFile = System.IO.Path.Join(wantedDirectory, runtimeFileName) - FileInfo(runtime_file).CopyTo(wanted_runtime_file, true) - |> ignore + FileInfo(runtime_file).CopyTo(wantedRuntimeFile, true) |> ignore |