Skip to content

Commit 0e6779f

Browse files
committed
Fixes for install scripts
1 parent acde021 commit 0e6779f

6 files changed

Lines changed: 8 additions & 14 deletions

File tree

sdata/lib/environment-variables.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ STY_UNDERLINE='\e[4m'
2121
STY_BLINK='\e[5m'
2222
STY_INVERT='\e[7m'
2323
STY_RST='\e[00m'
24+
25+
26+
# Used by register_temp_file()
27+
declare -a TEMP_FILES_TO_CLEANUP=()

sdata/lib/functions.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33

44
# shellcheck shell=bash
55

6-
# The script that use this file should have two lines on its top as follows:
7-
# cd "$(dirname "$0")"
8-
# export base="$(pwd)"
9-
106
function try { "$@" || sleep 0; }
117
function v(){
128
echo -e "####################################################"
@@ -253,9 +249,9 @@ function show_progress() {
253249
fi
254250
}
255251

256-
# Enhanced: Cleanup temporary files on exit
257-
declare -a TEMP_FILES_TO_CLEANUP=()
258252

253+
# Enhanced: Cleanup temporary files on exit
254+
#declare -a TEMP_FILES_TO_CLEANUP=()
259255
function register_temp_file() {
260256
local temp_file="$1"
261257
TEMP_FILES_TO_CLEANUP+=("$temp_file")

sdata/lib/options-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Options for install:
2626
}
2727

2828
cleancache(){
29-
rm -rf "$base/cache"
29+
rm -rf "${REPO_ROOT}/cache"
3030
}
3131

3232
# `man getopt` to see more

sdata/lib/options.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
# shellcheck shell=bash
55

6-
# The script that use this file should have two lines on its top as follows:
7-
# cd "$(dirname "$0")" export base="$(pwd)"
86
showhelp_global(){
97
echo -e "Syntax: $0 [subcommand] [options]...
108

sdata/lib/package-installers.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66

77
# This file is provided for any distros, mainly non-Arch(based) distros.
88

9-
# The script that use this file should have two lines on its top as follows:
10-
# cd "$(dirname "$0")"
11-
# export base="$(pwd)"
12-
139
install-agsv1(){
1410
x mkdir -p $REPO_ROOT/cache/agsv1
1511
x cd $REPO_ROOT/cache/agsv1

sdist/arch/install-deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ install-yay(){
88
x makepkg -o
99
x makepkg -se
1010
x makepkg -i --noconfirm
11-
x cd $base
11+
x cd ${REPO_ROOT}
1212
rm -rf /tmp/buildyay
1313
}
1414

0 commit comments

Comments
 (0)