mirror of
https://codeberg.org/vegvisir/install.git
synced 2025-09-14 00:33:41 +02:00
Compare commits
3 commits
658da80e03
...
fbeba8c348
Author | SHA1 | Date | |
---|---|---|---|
fbeba8c348 | |||
0097ace805 | |||
6be438b974 |
2 changed files with 9 additions and 4 deletions
|
@ -9,5 +9,5 @@ The script will only run on Linux environments with `coreutils` installed (for n
|
||||||
2. Run this command from the root directory of your local repository
|
2. Run this command from the root directory of your local repository
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://codeberg.org/vegvisir/install/raw/branch/master/install.sh | sh
|
curl -fsSL https://href.vlw.se/vegvisir/install | bash
|
||||||
```
|
```
|
11
install.sh
11
install.sh
|
@ -32,6 +32,11 @@ check_sys_depend() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_vegvisir() {
|
install_vegvisir() {
|
||||||
|
if ! [ -d ".git" ] ; then
|
||||||
|
echo_err "Not in a git repository"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if ! [ -d "vegvisir" ] ; then
|
if ! [ -d "vegvisir" ] ; then
|
||||||
git submodule add https://codeberg.org/vegvisir/vegvisir
|
git submodule add https://codeberg.org/vegvisir/vegvisir
|
||||||
fi
|
fi
|
||||||
|
@ -58,7 +63,7 @@ configure_vegvisir() {
|
||||||
# A configuration file already exists
|
# A configuration file already exists
|
||||||
if [ -f "vegvisir/.env.ini" ] ; then
|
if [ -f "vegvisir/.env.ini" ] ; then
|
||||||
echo "A Vegvisir configuration file already exists at: ${cwd}/vegvisir/.env.ini"
|
echo "A Vegvisir configuration file already exists at: ${cwd}/vegvisir/.env.ini"
|
||||||
read -p "Do you want to overwrite this file? (y/n): " choice
|
read -p "Do you want to overwrite this file? (y/n): " choice </dev/tty
|
||||||
|
|
||||||
# Check the user's response
|
# Check the user's response
|
||||||
if [[ "$choice" == "y" || "$choice" == "Y" ]] ; then
|
if [[ "$choice" == "y" || "$choice" == "Y" ]] ; then
|
||||||
|
@ -152,7 +157,7 @@ main() {
|
||||||
configure_vegvisir
|
configure_vegvisir
|
||||||
|
|
||||||
echo "Vegvisir has been sucessfully installed."
|
echo "Vegvisir has been sucessfully installed."
|
||||||
read -p "Do you want to generate a simple example website to start from? (y/n): " choice
|
read -p "Do you want to generate a simple example website to start from? (y/n): " choice </dev/tty
|
||||||
|
|
||||||
# Check the user's response
|
# Check the user's response
|
||||||
if [[ "$choice" == "y" || "$choice" == "Y" ]] ; then
|
if [[ "$choice" == "y" || "$choice" == "Y" ]] ; then
|
||||||
|
@ -164,7 +169,7 @@ main() {
|
||||||
|
|
||||||
# Prompt the user for confirmation
|
# Prompt the user for confirmation
|
||||||
echo "You are currently in: ${cwd}"
|
echo "You are currently in: ${cwd}"
|
||||||
read -p "Do you want to proceed with the installation in this directory? (y/n): " choice
|
read -p "Do you want to proceed with the installation in this directory? (y/n): " choice </dev/tty
|
||||||
|
|
||||||
# Check the user's response
|
# Check the user's response
|
||||||
if [[ "$choice" == "y" || "$choice" == "Y" ]] ; then
|
if [[ "$choice" == "y" || "$choice" == "Y" ]] ; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue