Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ docker build -t basbl_zsh_raffler basbl-zsh
docker build -t lucasvanlierop_cobol_raffler lucasvanlierop-cobol
docker build -t rjkip_elixir_raffler rjkip-elixir
docker build -t sgoettschkes_haskell_raffler sgoettschkes-haskell
docker build -t jaytaph_bootsector_asm_raffler jaytaph-bootsector-asm
17 changes: 17 additions & 0 deletions jaytaph-bootsector-asm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM jencryzthers/vboxinsidedocker
MAINTAINER lucas@vanlierop.org

ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive

# Create working dir
RUN mkdir -p /var/app
COPY . /var/app
WORKDIR /var/app

# Install dependencies
RUN apt-get update
RUN apt-get install -yy dosfstools mtools nasm

# Run raffler
CMD ["/var/app/vboxrun.sh"]
23 changes: 0 additions & 23 deletions jaytaph-bootsector-asm/install.sh

This file was deleted.

15 changes: 14 additions & 1 deletion jaytaph-bootsector-asm/vboxrun.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#!/bin/sh

# Creates an empty 1.44MB floppy image
dd if=/dev/zero of=mr_floppy.img bs=512 count=2880

# Format it
mkfs.msdos mr_floppy.img

mcopy -i mr_floppy.img /var/names/current ::/NAMES.DAT
mdir -i mr_floppy.img
nasm -o bootsector.img raffler.S

# copy bootsector to the start of the floppy image
dd if=bootsector.img of=mr_floppy.img bs=512 count=1 conv=notrunc

VBM=`which VBoxManage`

TS=`date +"%s"`
Expand All @@ -15,7 +28,7 @@ $VBM storagectl "$BOXNAME" --name "Mr Floppy Controller" --add floppy
$VBM storageattach "$BOXNAME" --storagectl "Mr Floppy Controller" --port 0 --device 0 --type fdd --medium mr_floppy.img

# Run the machine (you can reset the machine manually to raffle a new user!)
$VBM startvm "$BOXNAME" --type=gui
VBoxHeadless -s "$BOXNAME"



5 changes: 3 additions & 2 deletions raffle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ NAMES_FILE=`realpath $WORKING_DIR/$1`
cp $NAMES_FILE $NAMES_DIR/current

# Raffle a raffler ;-)
declare -a RAFFLER_NAMES=('basbl_zsh' 'lucasvanlierop_cobol' 'rjkip_elixir' 'sgoettschkes_haskell' 'shawnmccool_scala' 'aochagavia_rust')
declare -a RAFFLER_NAMES=('basbl_zsh' 'lucasvanlierop_cobol' 'rjkip_elixir' 'sgoettschkes_haskell' 'shawnmccool_scala' 'aochagavia_rust' 'jaytaph_bootsector_asm' )
RANDOM_RAFFLER=${RAFFLER_NAMES[$RANDOM % ${#RAFFLER_NAMES[@]} ]}
RANDOM_RAFFLER="jaytaph_bootsector_asm"

# run raffler in container with names dir mounted
CONTAINER_NAME="${RANDOM_RAFFLER}_raffler"
echo -e "Raffling using \033[91m$RANDOM_RAFFLER\e[0m"
echo -e "\033[92mAnd the winner is: "
docker run -v $NAMES_DIR:/var/names $CONTAINER_NAME
docker run -v $NAMES_DIR:/var/names -v /dev/vboxdrv:/dev/vboxdrv $CONTAINER_NAME
echo -e "\e[0m"