mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: introduce $Dos2Unix
This commit is contained in:
@ -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 ];
|
||||
|
Reference in New Issue
Block a user