#!/bin/bash

# local_clone_destination_dir my_fork_or_repo [upstream_repo]
mkdir -p /tmp/symlinks
symlinks_src_dest=(
    "/tmp/foo /tmp/symlinks/foo"
    "/tmp/bar /tmp/symlinks/bar"
)

for symlink in "${symlinks_src_dest[@]}"
do
    # Read in the string from symlinks_src_dest
    readarray -d ' ' src_dest_string_split <<< "${symlink}"

    # Make sure the src exists
    touch "${src_dest_string_split[0]}"

    # Create the symlink if the destination symlink does not exist
    if ! [[ -h "${src_dest_string_split[1]}" ]]; then
        ln -s "${src_dest_string_split[0]}" "${src_dest_string_split[1]}"
    fi
done