22 lines
642 B
Bash
22 lines
642 B
Bash
#!/bin/bash
|
|
BIN="../../utils/io.cdmnky.utils.replace.exe"
|
|
TS=$(date '+%Y.%m.%d.%H%M%S');
|
|
DBVERSION=`cat DBVERSION`
|
|
TRGT="./Forms/MainForm.cs"
|
|
|
|
cp $TRGT ./backup.txt
|
|
cp $TRGT ./wrk.txt
|
|
|
|
$BIN ./wrk.txt --search "[YYYY.MM.DD]" --replace $TS
|
|
$BIN ./wrk.txt --search "[N.N.N]" --replace $DBVERSION
|
|
|
|
# backup original exe before replacing...
|
|
EXEC="/c/Users/xboxo/Documents/Shared/Bin/newcle.us/newcle.us.exe"
|
|
BACK="/c/Users/xboxo/Documents/Shared/Bin/newcle.us/newcle.us-$TS.exe"
|
|
mv $EXEC $BACK
|
|
|
|
mv ./wrk.txt $TRGT
|
|
dotnet.exe build -c Release && cp ./bin/Release/net8.0-windows/newcle.us.* ~/Documents/Shared/Bin/newcle.us/
|
|
cp ./backup.txt $TRGT
|
|
|