#!/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


