~skiqqy/skelly

10e521cf7b1aab53899db4f14f701ca194eda43d — Stephen Cochrane 4 months ago 96d9baf
Fixed error in .build.yml
1 files changed, 21 insertions(+), 2 deletions(-)

M skelly.sh
M skelly.sh => skelly.sh +21 -2
@@ 55,6 55,7 @@ Options
-p [PATH]        Make use of a skelly directory to overide productions, defaults to \$HOME/.skelly
--debug          Enable Debugging.
-g               Disable init of local git repositroy.
-r [REMOTE]      Set git remote url, e.g: git@git.sr.ht:~<USER>

Commands:
$ $(basename "$0") list


@@ 167,7 168,7 @@ packages:
  - bash
tasks:
  - test: |
	  cd $1 && bash test.sh
      cd $1 && bash test.sh
EOF

	printf '\nDownloading %s.\n' "$2"


@@ 374,7 375,14 @@ s_new()
			# We are garenteed to have an init_"$lang" func, due to the assertion at the start
			init_"$lang" "$(basename "$proj")" "$license"
		fi
	"$git" && git init && git add . && git commit -m init # init repo if $git flag is set

		if "$git"
		then
			local tmp
			tmp=$(basename "$proj")
			git init && git add . && git commit -m init
			git remote add origin "$git_remote/${tmp,,}"
		fi
	popd > /dev/null || return 1
}



@@ 384,6 392,7 @@ main()
	loc=false
	debug=false
	git=true
	git_remote=

	# Option parsing, normally i use getopts, but -d is special
	while :;


@@ 411,6 420,16 @@ main()
			-g|--disable-git)
				git=false
				;;
			-r|--set-remote)
				if [ -z "$2" ] || [[ "$2" =~ ^- ]]
				then
					printf 'ERROR: -r takes an argument\n' >&2
					exit 1
				fi

				git_remote="$2"
				shift # We ate up the next argument
				;;
			-*)
					printf '%s is not a valid flag.\n' "$1" >&2
					usage 1