Skip to content

Commit

Permalink
add run-nc script & update fujinet-libs
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamink committed Mar 25, 2024
1 parent b45fa16 commit 67a6033
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 0.4.3

- 2024-03-25
- Features:
- Updates to `fujinet-lib` merged into main branch
- `run-nc` script added to make demo'ing `netcat` to the VM guest `localhost` easier

## 0.4.2

- 2024-03-20
Expand Down
26 changes: 26 additions & 0 deletions files/run-nc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

YELLOW="\e[1;33m"
BLUE="\e[1;36m"
GRAY="\e[37m"
DKBLUE_BACK="\e[44m"
NOCOLOR="\e[0m"

MY_IP="$(ip addr | grep -A1 "ether" | awk '/inet/ {print $2}' | sed 's#/24##')"

clear
echo -e "${GRAY}"
figlet -f mini -ck "Local IP address:"
echo -e "${YELLOW}"
figlet -f banner -c "$MY_IP"
echo -e "${NOCOLOR}"

echo -e "${GRAY}Connect to netcat with the following code in Altirra:"
echo -e "${BLUE}${DKBLUE_BACK}"
echo -e "\tOPEN #1,12,2,\"N:TCP://$MY_IP:6502/\""
echo -e "\tPRINT #1;\"HELLO FROM ATARI #x\""
echo -e "${NOCOLOR}${GRAY}"
echo -e "Running command ${BLUE}nc -l -p 6502${NOCOLOR}${GRAY} ... "
echo -e "${GRAY}Sent from the Atari:${NOCOLOR}"
echo -e "${YELLOW}"
netcat -l -p 6502
5 changes: 5 additions & 0 deletions fujinet.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ build {
]
}

provisioner "file" {
source = "files/run-nc"
destination = "/home/${local.username}/.local/bin/run-nc"
}

provisioner "file" {
source = "files/altirra-logo.png"
destination = "/home/${local.username}/Pictures/altirra-logo.png"
Expand Down
3 changes: 2 additions & 1 deletion scripts/user-setup.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/env bash
set -x

sudo apt-get install -y epiphany-browser
sudo apt-get install -y epiphany-browser figlet

mkdir "/home/$P_USERNAME/Desktop"
mkdir "/home/$P_USERNAME/Pictures"
mkdir "/home/$P_USERNAME/Downloads"
mkdir "/home/$P_USERNAME/Documents"
mkdir "/home/$P_USERNAME/.local/bin"
mkdir -p "${P_FN_PATH:-/home/$P_USERNAME/FujiNet}"

DISABLE_LIGHT_LOCKER_PATH="/home/$P_USERNAME/.config/autostart/light-locker.desktop"
Expand Down

0 comments on commit 67a6033

Please sign in to comment.