mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-15 12:34:29 +02:00
global-functions: introduce $Dos2Unix
This commit is contained in:
parent
7d3c4738d0
commit
d54c46ab98
1 changed files with 10 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
:global CharacterReplace;
|
||||
:global CleanFilePath;
|
||||
:global DeviceInfo;
|
||||
:global Dos2Unix;
|
||||
:global DownloadPackage;
|
||||
:global EitherOr;
|
||||
:global EscapeForRegEx;
|
||||
|
@ -226,6 +227,15 @@
|
|||
"\n Version: " . $ExpectedConfigVersion);
|
||||
}
|
||||
|
||||
# convert line endings, DOS -> UNIX
|
||||
:set Dos2Unix do={
|
||||
:local Input [ :tostr $1 ];
|
||||
|
||||
:global CharacterReplace;
|
||||
|
||||
:return [ $CharacterReplace $Input ("\r\n") ("\n") ];
|
||||
}
|
||||
|
||||
# download package from upgrade server
|
||||
:set DownloadPackage do={
|
||||
:local PkgName [ :tostr $1 ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue