github.com/NeowayLabs/nash@v0.2.2-0.20200127205349-a227041ffd50/cmd/nash/example.sh (about)

     1  #!/usr/bin/env nash
     2  
     3  -rm -rf rootfs
     4  
     5  rfork upmis {
     6      mount -t proc proc /proc
     7      mkdir -p rootfs
     8      mount -t tmpfs -o size=1G tmpfs rootfs
     9  
    10      cd rootfs
    11  
    12      wget "https://busybox.net/downloads/binaries/latest/busybox-x86_64" -O busybox
    13      chmod +x busybox
    14  
    15      mkdir bin
    16  
    17      ./busybox --install ./bin
    18  
    19      mkdir -p proc
    20      mkdir -p dev
    21      mount -t proc proc proc
    22      mount -t tmpfs tmpfs dev
    23  
    24      cp ../nash .
    25      chroot . /bin/sh
    26  }