This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
fn splice(src_rd: anytype, dst_wr: anytype, comptime buf_len: usize, lim: usize) !void { | |
var buf: [buf_len]u8 = undefined; | |
var left = lim; | |
while (true) { | |
const len = try src_rd.read(buf[0..@min(left, buf.len)]); | |
if (len == 0) break; | |
left = try std.math.sub(usize, left, len); | |
try dst_wr.writeAll(buf[0..len]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o allexport | |
source .env | |
set +o allexport | |
cd webapp && npm run build && cd .. && | |
ssh ${SSH_USER}@${SSH_HOST} -p $SSH_PORT "mkdir -p /var/www/example.com/webapp" && | |
rsync -avzr --delete --filter=':- .gitignore' -e 'ssh -p '${SSH_PORT} webapp/dist/webapp/ ${SSH_USER}@${SSH_HOST}:/var/www/example.com/webapp/ |
OlderNewer