add initial commit to git repositories created
This commit is contained in:
parent
cde52ab176
commit
cf4ca66c03
|
@ -1,6 +1,9 @@
|
||||||
export _url=hugo-skeleton.home
|
export _url=hugo-skeleton.home
|
||||||
export _user=ray
|
export _user=ray
|
||||||
|
|
||||||
|
export _git_user_name='rayelliott'
|
||||||
|
export _git_user_email='gitea@rayelliott.dev'
|
||||||
|
|
||||||
export _node_version=v12.16.1
|
export _node_version=v12.16.1
|
||||||
export _node_distro=linux-x64
|
export _node_distro=linux-x64
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,11 @@ fi
|
||||||
|
|
||||||
$_cmd_su "cd ~ && hugo new site $_hugo_site_name"
|
$_cmd_su "cd ~ && hugo new site $_hugo_site_name"
|
||||||
$_cmd_su "cd $_site_path && git init"
|
$_cmd_su "cd $_site_path && git init"
|
||||||
$_cmd_su "echo '/themes/' > $_site_path/.gitignore"
|
$_cmd_su "echo '/themes/' >> $_site_path/.gitignore"
|
||||||
|
$_cmd_su "echo 'node_modules/' >> $_site_path/.gitignore"
|
||||||
|
$_cmd_su "git config --global user.email '$_git_user_email'"
|
||||||
|
$_cmd_su "git config --global user.name '$_git_user_name'"
|
||||||
|
$_cmd_su "cd $_site_path && git add . && git commit -m 'initial commit'"
|
||||||
|
|
||||||
echo "#!/bin/sh" > "$_serve_script_path"
|
echo "#!/bin/sh" > "$_serve_script_path"
|
||||||
echo 'echo "sudo required to bind to port 80"' >> "$_serve_script_path"
|
echo 'echo "sudo required to bind to port 80"' >> "$_serve_script_path"
|
||||||
|
@ -53,6 +57,9 @@ if [ -n "$_hugo_theme_git_url" ] ; then
|
||||||
|
|
||||||
$_cmd_su "cd $_theme_path && yarn install"
|
$_cmd_su "cd $_theme_path && yarn install"
|
||||||
echo "theme = \"$_hugo_theme_name\"" >> $_site_path/config.toml
|
echo "theme = \"$_hugo_theme_name\"" >> $_site_path/config.toml
|
||||||
|
|
||||||
|
$_cmd_su "echo 'node_modules/' >> $_theme_path/.gitignore"
|
||||||
|
$_cmd_su "cd $_theme_path && git add . && git commit -m 'initial commit'"
|
||||||
else
|
else
|
||||||
_theme_path='No theme installed'
|
_theme_path='No theme installed'
|
||||||
fi
|
fi
|
||||||
|
|
Reference in New Issue