Ini uploader attempt (#1545)
* try * upload * Update upload.sh Co-authored-by: Andrei <andreikagit@users.noreply.github.com> Co-authored-by: rusefi <rusefi@users.noreply.github.com>
This commit is contained in:
parent
1857bfd70a
commit
b5d42a605e
|
@ -14,10 +14,17 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Tools
|
||||
run: sudo apt-get install ncftp
|
||||
|
||||
- name: Generate Configs
|
||||
working-directory: ./firmware/
|
||||
run: sh gen_config.sh
|
||||
|
||||
- name: Upload .ini files
|
||||
working-directory: ./firmware/tunerstudio
|
||||
run: ./upload.sh ${{ secrets.RUSEFI_ONLINE_FTP_USER }} ${{ secrets.RUSEFI_ONLINE_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}
|
||||
|
||||
- name: Generate Live Documentation
|
||||
working-directory: ./firmware/
|
||||
run: sh gen_live_documentation.sh
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
if [ ! "$1" ] || [ ! "$2" ] || [ ! "$3" ]; then
|
||||
echo "No Secrets"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -e "\nUploading .ini files"
|
||||
|
||||
for f in *.ini; do if [[ -f "$f" ]]; then
|
||||
echo "Processing file $f:"
|
||||
sig=$(grep "^ *signature *=" $f | cut -f2 -d "=")
|
||||
if [ ! -z "$sig" -a "$sig" != " " ]; then
|
||||
echo "* found signature: $sig"
|
||||
if [[ "$sig" =~ rusEFI.*([0-9]{4}[^\"]+) ]]; then
|
||||
sig=${BASH_REMATCH[1]}
|
||||
sig="${sig//\./\/}.ini"
|
||||
path="/rusefi/$sig"
|
||||
echo "* found path: $path"
|
||||
ncftpput -m -R -v -u "$1" -p "$2" "$3" autoupdate $path
|
||||
echo "* upload done!"
|
||||
fi
|
||||
fi
|
||||
fi; done
|
Loading…
Reference in New Issue