diff --git a/init.ps1 b/init.ps1 new file mode 100644 index 0000000..fc2c825 --- /dev/null +++ b/init.ps1 @@ -0,0 +1,16 @@ +# Get the current directory name +$current_dir = Split-Path -Path (Get-Location) -Leaf + +# Create README.md file +New-Item -Path "$current_dir\README.md" -ItemType File + +# Initialize git repository +git init +git remote add all "https://github.com/Notoric/$current_dir.git" +git remote set-url --add --push all "https://github.com/Notoric/$current_dir.git" +git remote set-url --add --push all "https://gitea.notoricloud.net/Notoric/$current_dir.git" +git add . +git branch -M main +git commit -m "initial commit" +git push origin main +git push gitea main diff --git a/init.sh b/init.sh new file mode 100644 index 0000000..ce73eef --- /dev/null +++ b/init.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Define the name of the repo as the current directory name +current_dir=$(basename "${PWD}") + +# Create a readme file +touch README.md + +# Initialize git repository +git init +git remote add all https://github.com/Notoric/$REPO.git +git remote set-url --add --push all https://github.com/Notoric/$REPO.git +git remote set-url --add --push all https://gitea.notoricloud.net/Notoric/$REPO.git +git add . +git branch -M main +git commit -m "initial commit" +git push all main \ No newline at end of file