-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlib
28 lines (25 loc) · 975 Bytes
/
lib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// This file is distributed under the terms of the MIT license, (c) Björn Kerman
@LAZYGLOBAL OFF.
DECLARE LOCAL NLIST IS LIST().
DECLARE LOCAL LOGNAME IS "".
DECLARE LOCAL PATH IS "".
DECLARE LOCAL NCOUNT IS 0.
DECLARE LOCAL LISTL IS 0.
PARAMETER NLIST IS "circle_nav,enum,exec,geodec,gui_box,input_string,lazcalc,list_dialog,menu,navball,navigation,num_to_formatted_str,num_to_str,number_dialog,raw_user_input,realchute,running_average_filter,seven_seg,term", LOGNAME IS "liblog.txt".
CD (archive).
SET NLIST TO NLIST:SPLIT(",").
SET LISTL TO NLIST:LENGTH.
IF EXISTS(LOGNAME) DELETEPATH(LOGNAME).
UNTIL NCOUNT = LISTL {
CD (library).
SET PATH TO "lib_" + NLIST[NCOUNT] + ".ks".
IF EXISTS(PATH) {
RUNPATH(PATH).
CD (archive).
LOG "LOG-" + NCOUNT + ": did load: " + NLIST[NCOUNT] + "." TO LOGNAME.
} ELSE {
CD (archive).
LOG "ERR-" + NCOUNT + ": UNABLE TO LOAD: " + NLIST[NCOUNT] + "!" TO LOGNAME.
}.
SET NCOUNT TO NCOUNT + 1.
}.