git @ Cat's Eye Technologies The-Glosscubator / master script / convert_dir.sh
master

Tree @master (Download .tar.gz)

convert_dir.sh @masterraw · history · blame

#!/bin/sh -ex

# SPDX-FileCopyrightText: Chris Pressey, the original author of this work, has dedicated it to the public domain.
# For more information, please refer to <https://unlicense.org/>
# SPDX-License-Identifier: Unlicense

if [ -d "$1" ]; then
    mkdir -p "$1/src"
    if [ -e "$1/Webpages.md" ]; then
        git mv "$1/Webpages.md" "$1/src/Webpages.md"
        git mv "$1/Books.md" "$1/src/Books.md"
    else
        cp "$1/README.md" "$1/src/Webpages.md"
        git add "$1/src/Webpages.md"
    fi
else
    echo "not a dir"
    exit 1
fi