# Get it
cd
test -f installed/dcraw.tar.xz && mv -f installed/dcraw.tar.xz .
test -f dcraw.tar.xz && tar xJvf dcraw.tar.xz && rm dcraw.tar.xz
wget -N https://www.cybercom.net/~dcoffin/dcraw/dcraw.c \
https://www.cybercom.net/~dcoffin/dcraw/dcraw.1
# Create a directory for the source
mkdir -p -m 0700 src
cd src
test -d dcraw && rm -r dcraw
mkdir -p -m 0700 dcraw
cd dcraw
test -f ~/dcraw.1 && mv -f ~/dcraw.1 .
test -f ~/dcraw.c && mv -f ~/dcraw.c .
## Build it without jasper, jpeg, and lcms2
# gcc -o dcraw -0$ dcraw.c -lm -DNODEPS
# Install it as root
install -s dcraw /usr/local/bin/
install -m 644 dcraw.1 /usr/local/man/man1/
# Become yourself again
exit
# Save the .c and .1 files as dcraw.tar.xz
cd
mkdir -p 0700 installed
rm -f installed/dcraw.tar.*
tar cJvf ~/installed/dcraw.tar.xz dcraw.1 dcraw.c
rm -f dcraw.1 dcraw.c