mirror of
https://github.com/nihas101/steamos-scripts.git
synced 2026-10-06 01:00:16 +02:00
32 lines
651 B
Bash
Executable File
32 lines
651 B
Bash
Executable File
#!/bin/bash
|
|
|
|
function yes_or_no {
|
|
while true; do
|
|
read -p "$* [y/n]: " yn
|
|
case $yn in
|
|
[Yy]*) return 0 ;;
|
|
[Nn]*) return 1 ;;
|
|
esac
|
|
done
|
|
}
|
|
|
|
function install_lein {
|
|
lein="${HOME}/bin/lein"
|
|
|
|
if [ -e ${lein} ]; then
|
|
lein -v
|
|
yes_or_no "lein is already installed, do you want to overwrite the existing installation?"
|
|
fi
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo "Aborting install of lein."
|
|
return 0
|
|
fi
|
|
|
|
echo "Installing lein..."
|
|
curl httpis://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein -o "$lein"
|
|
chmod u+x "$lein"
|
|
}
|
|
|
|
install_lein
|