mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-04-17 08:48:29 -04:00
Fix two defects in the sample uploader target
Also added new sample files to samples/CMakeLists.txt git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7210 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
91ea5ffa08
commit
e87d9a572b
@ -1,7 +1,16 @@
|
||||
set (SAMPLE_FILES
|
||||
ISCAT/ISCAT-A/VK7MO_110401_235515.wav
|
||||
ISCAT/ISCAT-B/K0AWU_100714_115000.wav
|
||||
JT4/JT4A/DF2ZC_070926_040700.WAV
|
||||
JT4/JT4F/OK1KIR_141105_175700.WAV
|
||||
JT65/JT65B/DL7UAE_040308_002400.wav
|
||||
JT9+JT65/130610_2343.wav
|
||||
JT9/130418_1742.wav
|
||||
JT65/JT65B/DL7UAE_040308_002400.wav
|
||||
MSK144/160915_113100.wav
|
||||
MSK144/160915_113230.wav
|
||||
QRA64/QRA64A/160707_1554.wav
|
||||
QRA64/QRA64A/160729_0056.wav
|
||||
WSPR/150426_0918.wav
|
||||
)
|
||||
|
||||
set (contents_file_name contents_${WSJTX_VERSION_MAJOR}.${WSJTX_VERSION_MINOR}.json)
|
||||
|
@ -1,5 +1,11 @@
|
||||
string (REPLACE " " ";" FILES ${FILES}) # make back into a list
|
||||
|
||||
function(JOIN VALUES GLUE OUTPUT)
|
||||
string (REGEX REPLACE "([^\\]|^);" "\\1${GLUE}" _TMP_STR "${VALUES}")
|
||||
string (REGEX REPLACE "[\\](.)" "\\1" _TMP_STR "${_TMP_STR}") #fixes escaping
|
||||
set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function (indent)
|
||||
foreach (temp RANGE ${level})
|
||||
file (APPEND ${contents_file} " ")
|
||||
@ -41,6 +47,7 @@ foreach (file IN LISTS FILES)
|
||||
while ((NOT ${pos} EQUAL 0) AND ${cwd_count} GREATER 0)
|
||||
math (EXPR cwd_count "${cwd_count} - 1")
|
||||
list (REMOVE_AT cwd ${cwd_count})
|
||||
string (FIND "${dirs}" "${cwd}" pos)
|
||||
end_entry ()
|
||||
endwhile ()
|
||||
# back to same root
|
||||
@ -74,7 +81,8 @@ foreach (file IN LISTS FILES)
|
||||
math (EXPR level "${level} + 2")
|
||||
math (EXPR path_count "${path_count} - 1")
|
||||
endwhile ()
|
||||
file (COPY ${file} DESTINATION ${DEST}/web/samples/${cwd})
|
||||
JOIN ("${cwd}" "/" path)
|
||||
file (COPY "${file}" DESTINATION "${DEST}/web/samples/${path}")
|
||||
if (${first})
|
||||
file (APPEND ${contents_file} "\n")
|
||||
set (first 0)
|
||||
|
Loading…
Reference in New Issue
Block a user