update remote scripts

This commit is contained in:
Niklas Kiefer
2017-02-27 17:31:26 +01:00
parent a50f1ae62a
commit fb8558f5ab
3 changed files with 17 additions and 4 deletions

View File

@ -1,6 +1,10 @@
#!/bin/bash
# CodeOcean Remote Client v0.5
# run like this:
# cd path/to/project_root
# .scripts/macos.sh .
# CodeOcean Remote Client v0.6
#file_info format: <path/to/file/><file_name>=<id> (src/frog.java=34)
#file_path format: <path/to/file/><file_name>
@ -28,6 +32,7 @@ function get_valid_file_path {
function get_escaped_file_content {
file_path="$1"
cat "$file_path" |
perl -p -e 's@\\@\\\\@g' |
perl -p -e 's@\r\n@\\n@g' |
perl -p -e 's@\n@\\n@g' |
perl -p -e 's@"@\\"@g'

View File

@ -1,6 +1,10 @@
#!/bin/bash
# CodeOcean Remote Client v0.5
# run like this:
# cd path/to/project_root
# .scripts/ubuntu.sh .
# CodeOcean Remote Client v0.6
#file_info format: <path/to/file/><file_name>=<id> (src/frog.java=34)
#file_path format: <path/to/file/><file_name>
@ -27,6 +31,7 @@ function get_valid_file_path {
function get_escaped_file_content {
file_path="$1"
cat "$file_path" |
perl -p -e 's@\\@\\\\@g' |
perl -p -e 's@\r\n@\\n@g' |
perl -p -e 's@\n@\\n@g' |
perl -p -e 's@"@\\"@g'

View File

@ -1,6 +1,8 @@
# run like this: powershell.exe -noprofile -executionpolicy bypass -file path\to\client_script.ps1 path\to\project_root
# run like this:
# cd path\to\project_root
# powershell.exe -noprofile -executionpolicy bypass -file .scripts\windows.ps1 .
# CodeOcean Remote Client v0.5
# CodeOcean Remote Client v0.6
#file_info format: <path/to/file/><file_name>=<id> (src/frog.java=34)
#file_path format: <path/to/file/><file_name>
@ -57,6 +59,7 @@ function get_file ($file_path){
function get_escaped_file_content ($file){
$content = [IO.File]::ReadAllText($file.fullname)
$content = $content.replace('\', '\\')
$content = $content -replace "`r`n", '\n'
$content = $content -replace "`n", '\n'
$content = $content.replace('"', '\"')