๐
This file contains hidden or 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
After asked grok3 lots of options, the only one that works for me: | |
```sh | |
# log and append history while preserving $_ | |
append_log_history() { | |
# Save the current $_ | |
local saved_underscore="$_" | |
echo -n '' > /tmp/history$$ | |
HISTFILE=/tmp/history$$ history -a | |
cat /tmp/history$$ >> "$BASH_HISTORY_BACKUP_FILE" |
This file contains hidden or 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
# Stage 1: The Builder | |
# Use a Ubuntu latest(24.04) base image, specifying the target architecture. | |
FROM --platform=linux/amd64 ubuntu:latest AS builder | |
# debug info | |
# RUN lsb_release -c | |
RUN cat /etc/os-release | |
# add deb-src to sources.list so that we can build git from source code | |
RUN echo "deb-src http://archive.ubuntu.com/ubuntu/ noble main restricted universe multiverse" >> /etc/apt/sources.list |