fix python scripts
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# After running this script:
|
# After running this script:
|
||||||
# 1. python3 is installed
|
# 1. python is installed
|
||||||
#
|
#
|
||||||
|
|
||||||
# 1. python is installed
|
# 1. python is installed
|
||||||
if not_installed "python3"; then
|
if not_installed "python"; then
|
||||||
|
|
||||||
printf "Installing python3...\n"
|
printf "Installing python...\n"
|
||||||
|
|
||||||
pyenv install -s 3.7.0
|
pyenv install -s 3.7.0
|
||||||
pyenv global 3.7.0
|
pyenv global 3.7.0
|
||||||
|
|
||||||
fi
|
fi
|
||||||
printf "python3 is installed\n"
|
printf "python is installed\n"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ if not_installed "poetry"; then
|
|||||||
printf "Installing poetry...\n"
|
printf "Installing poetry...\n"
|
||||||
|
|
||||||
# Install poetry
|
# Install poetry
|
||||||
run https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py python3
|
run https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py python
|
||||||
|
|
||||||
fi
|
fi
|
||||||
printf "poetry is installed\n"
|
printf "poetry is installed\n"
|
||||||
|
|||||||
8
utils.sh
8
utils.sh
@@ -22,18 +22,18 @@ install() {
|
|||||||
|
|
||||||
# @arg $1 repository to add
|
# @arg $1 repository to add
|
||||||
app_ppa() {
|
app_ppa() {
|
||||||
sudo add-apt-repository -y ppa:"$1" &>/dev/null
|
sudo add-apt-repository -y ppa:$1 &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
# @arg $1 url to add
|
# @arg $1 url to add
|
||||||
add_key() {
|
add_key() {
|
||||||
curl -fsSL "$1" | sudo apt-key add -
|
curl -fsSL $1 | sudo apt-key add -
|
||||||
}
|
}
|
||||||
|
|
||||||
# @arg $1 URL to run
|
# @arg $1 URL to run
|
||||||
# @arg $2 binary to use
|
# @arg $2 binary to use
|
||||||
run() {
|
run() {
|
||||||
curl -fsSL "$1" | "$2"
|
curl -fsSL $1 | $2
|
||||||
}
|
}
|
||||||
|
|
||||||
# Symlink contents of source folder to target
|
# Symlink contents of source folder to target
|
||||||
@@ -41,7 +41,7 @@ run() {
|
|||||||
# @arg $1 source folder
|
# @arg $1 source folder
|
||||||
# @arg $2 target folder
|
# @arg $2 target folder
|
||||||
link_folder() {
|
link_folder() {
|
||||||
cp -srf "$1/." "$2"
|
cp -srf $1/. $2
|
||||||
}
|
}
|
||||||
|
|
||||||
indent() { sed 's/^/ /'; }
|
indent() { sed 's/^/ /'; }
|
||||||
|
|||||||
Reference in New Issue
Block a user