fix /opt
This commit is contained in:
+3
-4
@@ -2,14 +2,13 @@
|
|||||||
|
|
||||||
## CONSTANTS
|
## CONSTANTS
|
||||||
|
|
||||||
readonly DESTINATION=/opt/miaou-bash
|
readonly DESTINATION=/opt
|
||||||
readonly MAIN_TAR_GZ_URL="https://git.artcode.re/miaou/miaou-bash/archive/main.tar.gz"
|
readonly MAIN_TAR_GZ_URL="https://git.artcode.re/miaou/miaou-bash/archive/main.tar.gz"
|
||||||
|
|
||||||
## FUNCTIONS
|
## FUNCTIONS
|
||||||
|
|
||||||
function bootstrap {
|
function bootstrap {
|
||||||
if [[ ! -d "$DESTINATION" ]]; then
|
if [[ ! -d "$DESTINATION/miaou-bash" ]]; then
|
||||||
mkdir -p "$DESTINATION"
|
|
||||||
local temp_dir
|
local temp_dir
|
||||||
temp_dir=$(mktemp -d)
|
temp_dir=$(mktemp -d)
|
||||||
pushd "$temp_dir" || return 2
|
pushd "$temp_dir" || return 2
|
||||||
@@ -22,7 +21,7 @@ function bootstrap {
|
|||||||
local dest_bin="/usr/bin/miaou-bash"
|
local dest_bin="/usr/bin/miaou-bash"
|
||||||
cmp -s "$source_bin" "$dest_bin" || cp -f "$source_bin" "$dest_bin"
|
cmp -s "$source_bin" "$dest_bin" || cp -f "$source_bin" "$dest_bin"
|
||||||
|
|
||||||
export MIAOU_BASH_DIR="$DESTINATION"
|
export MIAOU_BASH_DIR="$DESTINATION/miaou-bash"
|
||||||
}
|
}
|
||||||
|
|
||||||
## MAIN
|
## MAIN
|
||||||
|
|||||||
Reference in New Issue
Block a user