Skip to content

Commit

Permalink
Always pull newer; small error on copy config
Browse files Browse the repository at this point in the history
  • Loading branch information
gbraad committed Jan 24, 2025
1 parent b36c5f8 commit 77ce91a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions zsh/.zshrc.d/devenv.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ devenv() {
"--device=/dev/net/tun"
"--device=/dev/fuse"
"--userns=keep-id"
#"--pull=newer"
)
# issue as some containers do not have this yet
#"--workdir=$(devini --get devenv.workdir)"
Expand All @@ -38,18 +39,17 @@ devenv() {
$(generate_image_name $PREFIX) ${START_SHELL}
;;
"sys" | "system" | "create")

for i in {1..${#START_PATHS[@]}}; do
START_PATHS[i]="${START_PATHS[i]/#\~/$HOME}"
for (( i=0; i < ${#START_PATHS[@]}; i++ )); do
START_PATHS[$i]="${START_PATHS[$i]/#\~/$HOME}"
done
podman run -d --name=${PREFIX}sys --hostname ${HOSTNAME}-${PREFIX}sys \
"${START_ARGS[@]}" "${START_PATHS[@]}" \
$(generate_image_name $PREFIX)
# TODO: systemd only when able to check for running state
#&& (mkdir -p ${HOME}/.config/systemd/user && cd ${HOME}/.config/systemd/user \
#&& podman generate systemd --name --files ${PREFIX}sys) \
#&& systemctl --user daemon-reload \
#&& systemctl --user start container-${PREFIX}sys
# TODO: systemd only when able to check for running state
#&& (mkdir -p ${HOME}/.config/systemd/user && cd ${HOME}/.config/systemd/user \
#&& podman generate systemd --name --files ${PREFIX}sys) \
#&& systemctl --user daemon-reload \
#&& systemctl --user start container-${PREFIX}sys
;;
"start")
if (! podman ps -a --format "{{.Names}}" | grep -q ${PREFIX}sys); then
Expand Down
2 changes: 1 addition & 1 deletion zsh/.zshrc.d/machine.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ machine() {
"switch")
sudo bootc switch $(mcnini --get images.${PREFIX})
;;
"copy-config" || "cc")
"copy-config" | "cc")
value="$(mcnini --get disks.${PREFIX})"
$(mcnini --add disks.$1 $value)
;;
Expand Down

0 comments on commit 77ce91a

Please sign in to comment.