Skip to content

Commit

Permalink
Adding gitignore with minimum content.
Browse files Browse the repository at this point in the history
  • Loading branch information
shinokada committed Jun 8, 2021
1 parent 754c471 commit e06c915
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions gitstart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ unset user dir repo license_url

script_name=$(basename "$0")
dir=""
version="0.2.2"
version="0.2.3"

usage() {
cat <<EOF
Expand Down Expand Up @@ -169,7 +169,7 @@ done

if [[ ${license_url} != false ]]; then
touch "${dir}"/license.txt
curl -s "https://api.github.com/licenses/${license_url}" | jq -r '.body' >"${dir}"/license.txt
curl -s "https://api.github.com/licenses/${license_url}" | jq -r '.body' >"${dir}"/license.txt
echo ">>> license.txt created."
fi

Expand All @@ -187,7 +187,9 @@ if [[ ${prog_lang} ]]; then
echo ">>> .gitignore created."
else
echo ">>> Not able to find ${1^} gitignore at https://github.com/github/gitignore."
echo ">>> Proceeding without .gitignore."
echo ">>> Adding .gitignore with minimum contents."
touch .gitignore
echo "DS_Store" >.gitignore
fi
fi

Expand Down Expand Up @@ -221,5 +223,4 @@ echo ">>> Pushing local repo to the remote."
git push -u origin main
echo ">>> You have created a github repo at https://github.com/${user}/${repo}"


exit 0
exit 0

0 comments on commit e06c915

Please sign in to comment.