mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00: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…
Reference in a new issue