summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty211
1 files changed, 0 insertions, 211 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty b/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty
deleted file mode 100644
index f08e91bba4b..00000000000
--- a/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty
+++ /dev/null
@@ -1,211 +0,0 @@
-%%
-%% This is file `l3sys-shell.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% l3sys-shell.dtx (with options: `package')
-%%
-%% Copyright (C) 2018-2024 The LaTeX Project
-%%
-%% It may be distributed and/or modified under the conditions of
-%% the LaTeX Project Public License (LPPL), either version 1.3c of
-%% this license or (at your option) any later version. The latest
-%% version of this license is in the file:
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3experimental bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% File: l3sys-shell.dtx
-\RequirePackage{expl3}
-\ProvidesExplPackage{l3sys-shell}{2024-02-20}{}
- {L3 Experimental system shell functions}
-\scan_new:N \s__sys_stop
-\quark_new:N \q__sys_nil
-\__kernel_quark_new_conditional:Nn \__sys_quark_if_nil:N { F }
-\cs_new:Npn \__sys_path_to_win:n #1
- {
- \exp_after:wN \__sys_path_to_win:w \tl_to_str:n {#1} ~ \s__sys_stop
- }
-\cs_new:Npn \__sys_path_to_win:w #1 ~ #2 \s__sys_stop
- {
- \__sys_path_to_win:N #1 \q__sys_nil
- \tl_if_empty:nF {#2}
- {
- \c_space_tl
- \__sys_path_to_win:w #2 \s__sys_stop
- }
- }
-\cs_new:Npn \__sys_path_to_win:N #1
- {
- \__sys_quark_if_nil:NF #1
- {
- \token_if_eq_meaning:NNTF #1 /
- { \c_backslash_str }
- {#1}
- \__sys_path_to_win:N
- }
- }
-\cs_new_protected:Npe \sys_shell_cp:nn #1#2
- {
- \sys_if_shell_unrestricted:T
- {
- \sys_shell_now:e
- {
- \sys_if_platform_unix:T
- {
- cp~-f~ \exp_not:N \tl_to_str:n {#1} ~
- \exp_not:N \tl_to_str:n {#2}
- }
- \sys_if_platform_windows:T
- {
- copy~/y~ \exp_not:N \__sys_path_to_win:n {#1} ~
- \exp_not:N \__sys_path_to_win:n {#2}
- }
- }
- }
- }
-\cs_new_protected:Npe \sys_shell_mkdir:n #1
- {
- \sys_if_shell_unrestricted:T
- {
- \sys_shell_now:e
- {
- \sys_if_platform_unix:T
- { mkdir~-p~ \exp_not:N \tl_to_str:n {#1} }
- \sys_if_platform_windows:T
- {
- if~not~exist~
- \exp_not:N \__sys_path_to_win:n { #1 / nul } ~
- mkdir~ \exp_not:N \__sys_path_to_win:n {#1}
- }
- }
- }
- }
-\cs_new_protected:Npe \sys_shell_mv:nn #1#2
- {
- \sys_if_shell_unrestricted:T
- {
- \sys_shell_now:e
- {
- \sys_if_platform_unix:T
- {
- mv~ \exp_not:N \tl_to_str:n {#1} ~
- \exp_not:N \tl_to_str:n {#2}
- }
- \sys_if_platform_windows:T
- {
- copy~/y~ \exp_not:N \__sys_path_to_win:n {#1} ~
- \exp_not:N \__sys_path_to_win:n {#2}
- \token_to_str:N & \token_to_str:N &
- del~/f~/q~\exp_not:N \__sys_path_to_win:n {#1}
- }
- }
- }
- }
-\cs_new_protected:Npe \sys_shell_rm:n #1
- {
- \sys_if_shell_unrestricted:T
- {
- \sys_shell_now:e
- {
- \sys_if_platform_unix:T
- { rm~-f~ \exp_not:N \tl_to_str:n {#1} }
- \sys_if_platform_windows:T
- { del~/f~/q~ \exp_not:N \__sys_path_to_win:n {#1} }
- }
- }
- }
-\cs_new_protected:Npe \sys_shell_rmdir:n #1
- {
- \sys_if_shell_unrestricted:T
- {
- \sys_shell_mkdir:n {#1}
- \sys_shell_now:e
- {
- \sys_if_platform_unix:T
- { rm~-rf~ \exp_not:N \tl_to_str:n {#1} }
- \sys_if_platform_windows:T
- { rmdir~/s~/q~ \exp_not:N \__sys_path_to_win:n {#1} }
- }
- }
- }
-\seq_new:N \l__sys_tmp_seq
-\tl_new:N \l__sys_tmp_tl
-\cs_new_protected:Npe \sys_get_shell_pwd:N #1
- {
- \sys_if_shell_unrestricted:T
- {
- \exp_not:N \sys_get_shell:nnN
- {
- \sys_if_platform_unix:T { pwd }
- \sys_if_platform_windows:T { cd }
- }
- {
- \char_set_catcode_other:N \exp_not:N \\
- \char_set_catcode_other:N \exp_not:N \#
- \char_set_catcode_other:N \exp_not:N \~
- \char_set_catcode_other:N \exp_not:N \%
- \char_set_catcode_space:N \exp_not:N \ %
- \tex_endlinechar:D -1 \scan_stop:
- }
- \exp_not:N \l__sys_tmp_tl
- \str_set:NV #1 \exp_not:N \l__sys_tmp_tl
- }
- }
-\cs_new_protected:Npe \sys_shell_split_ls:nN #1#2
- {
- \sys_if_shell_unrestricted:T
- {
- \exp_not:N \exp_args:Ne \exp_not:N \sys_get_shell:nnN
- {
- \sys_if_platform_unix:T { ls~-1~ #1 }
- \sys_if_platform_windows:T
- { dir~/b~/s~ \exp_not:N \__sys_path_to_win:n {#1} }
- }
- {
- \ExplSyntaxOff
- \char_set_catcode_other:N \exp_not:N \\
- \char_set_catcode_other:N \exp_not:N \#
- \char_set_catcode_other:N \exp_not:N \~
- \char_set_catcode_other:N \exp_not:N \%
- \char_set_catcode_other:n { 13 }
- }
- \exp_not:N \l__sys_tmp_tl
- \str_set:NV \exp_not:N \l__sys_tmp_tl \exp_not:N \l__sys_tmp_tl
- \seq_set_split:NnV #2 { \char_generate:nn { `\^^M } { 12 } }
- \exp_not:N \l__sys_tmp_tl
- \seq_pop_right:NN #2 \exp_not:N \l__sys_tmp_tl
- \exp_not:N \tl_if_blank:eTF { \exp_not:N \seq_item:Nn #2 { 1 } }
- { \seq_clear:N #2 }
- \sys_if_platform_windows:T
- {
- \sys_get_shell_pwd:N \exp_not:N \l__sys_tmp_tl
- \exp_not:N \exp_args:NV \exp_not:N \__sys_shell_split_ls:nN
- \exp_not:N \l__sys_tmp_tl #2
- }
- }
- }
-\sys_if_platform_windows:T
- {
- \cs_new_protected:Npe \__sys_shell_split_ls:nN #1#2
- {
- \cs_set:Npn \exp_not:N \__sys_shell_split_ls:w #1 \c_backslash_str { }
- \seq_set_eq:NN \exp_not:N \l__sys_tmp_seq #2
- \seq_clear:N #2
- \seq_map_inline:Nn \exp_not:N \l__sys_tmp_seq
- {
- \tl_set:Ne \exp_not:N \l__sys_tmp_tl
- { \exp_not:N \__sys_shell_split_ls:w ##1 }
- \tl_replace_all:Nnn \exp_not:N \l__sys_tmp_tl
- { \c_backslash_str } { / }
- \seq_put_right:NV #2 \exp_not:N \l__sys_tmp_tl
- }
- }
- \cs_new:Npn \__sys_shell_split_ls:w { }
- }
-%%
-%%
-%% End of file `l3sys-shell.sty'.