DataMuseum.dk

Presents historical artifacts from the history of:

RC9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦748517516⟧ TextFile

    Length: 397 (0x18d)
    Types: TextFile
    Names: »mkdirhier«

Derivation

└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
    └─⟦19b5af8a1⟧ »0006« 
        └─⟦this⟧ »./usr/bin/X11/mkdirhier« 

TextFile

#!/bin/sh

#
# create a heirarchy of directories (mkdir that makes everything)
#

for f in $*; do
    parts=`echo $f | sed 's,\(.\)/\(.\),\1 \2,g' | sed 's,/$,,'`;
    path="";
    for p in $parts; do
	if [ x"$path" = x ]; then
	    dir=$p;
	else
	    dir=$path/$p;
	fi;
	if [ ! -d $dir ]; then
	    echo mkdir $dir; 
	    mkdir $dir;
	    chmod a+rx $dir; 
	fi;
	path=$dir;
    done;
done
exit 0