Skip to content

Instantly share code, notes, and snippets.

@hatsuyuki15
hatsuyuki15 / lndir.sh
Created July 9, 2022 07:07 — forked from xombiemp/lndir.sh
This script will allow you to effectively hard link a directory. It reproduces the directory structure of the source in the destination and then recursively hard links all the files from the source to the corresponding location in the destination. If you've ever wanted to hard link a folder, this produces the results you want.
#!/bin/bash
oldifs=$IFS
IFS='
'
[ $# -ne 2 ] && { echo "Usage: $0 sourceDirectory destinationDirectory" ; exit 1; }
[ ! -d "$1" ] && { echo "$1 is not a valid directory"; exit 1; }
[ ! -d "$2" ] && { mkdir -p "$2"; }
src=$(cd "$1" ; pwd)
dst=$(cd "$2" ; pwd)
find "$src" -type d |
kind: pipeline
name: default
steps:
- name: build
image: gradle
commands:
- gradle build
- name: test
from struct import unpack
with open('font.dat', 'rb') as f:
data = f.read()
# read offset list
offsetList = []
cursor = 0
endOfFS = len(data)
while cursor < endOfFS: