Advertisement
s243a

mk-sfs-fm-rootfs.sh

Feb 8th, 2020
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. padsfs() {
  4. ORIGSIZE=$(stat -c %s "$1")
  5. BLOCKS256K=$(( ((ORIGSIZE/1024/256)+1) ))
  6. dd if=/dev/zero of="$1" bs=256K seek=$BLOCKS256K count=0
  7. }
  8. make_sfs() {
  9. local output="$1" dir=${1%/*}
  10. shift
  11. [ "$dir" ] && [ "$dir" != "$output" ] && mkdir -p $dir
  12. #echo $DISTRO_VERSION > $CHROOT_DIR/etc/${DISTRO_PREFIX}-version
  13. mksquashfs $CHROOT_DIR "$output" -noappend "$@"
  14. padsfs "$output"
  15. }
  16. #. ./build.conf
  17.  
  18. #export VERSION=${VERSION:-ascii}
  19. #export DISTRO_PREFIX=${DISTRO_PREFIX:-puppy}
  20. #export DISTRO_VERSION=${DISTRO_VERSION:-700} # informative only
  21. for A_SFS in ADRVSFS; do #PUPPYSFS
  22. case "$A_SFS" in
  23. PUPPYSFS)
  24. CHROOT_DIR="/mnt/sb/fakeroot"
  25. ;;
  26. ADRVSFS)
  27.  
  28. ;;
  29. esac
  30. CHROOT_DIR="chroot-ascii-i386"
  31. PUPPY_SFS="${PUPPY_SFS:-puppy.sfs}"
  32. make_sfs $ISO_ROOT/$PUPPY_SFS -comp gzip
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement