Przeglądaj źródła

rename variable TRASHDIR to TEMPDIR

master
belliash 7 lat temu
rodzic
commit
3b1e85cbe4
3 zmienionych plików z 20 dodań i 20 usunięć
  1. 1
    1
      config/layout.conf
  2. 10
    10
      libraries/filesystem
  3. 9
    9
      modules/update-notification.ezmod

+ 1
- 1
config/layout.conf Wyświetl plik

@@ -23,7 +23,7 @@ PACKAGESDIR="${STOREDIR}/packages"
23 23
 PORTAGESDIR="${STOREDIR}/portages"
24 24
 
25 25
 # This specifies the directory where EzBuild will put its temporary files and caches.
26
-TRASHDIR="${STOREDIR}/temp"
26
+TEMPDIR="${STOREDIR}/temp"
27 27
 
28 28
 # Directive sets the filename for logging of all information about the progress and of all
29 29
 # executed commands output. This has to contain absolute path to the created file.

+ 10
- 10
libraries/filesystem Wyświetl plik

@@ -88,7 +88,7 @@ function generateDigests() {
88 88
 #-------------------------------------------------------------------------------
89 89
 function makeCoreDirectories() {
90 90
 	local DIRS="${BINDIR} ${BUILDDIR} ${LOGFILE%/*} ${OVERLAYSDIR} \
91
-		${PACKAGESDIR} ${PORTAGESDIR} ${STOREDIR} ${TRASHDIR}"
91
+		${PACKAGESDIR} ${PORTAGESDIR} ${STOREDIR} ${TEMPDIR}"
92 92
 	for DIR in ${DIRS}; do
93 93
 		makeDirectory ${DIR} || return 1
94 94
 	done
@@ -166,26 +166,26 @@ function mergeOverlay() {
166 166
 	local ORW="${5}"
167 167
 	local SRC="${1}"
168 168
 	local TOPDIR="$(pwd)"
169
-	makeCleanDirectory ${TRASHDIR}/ebuilds || return 1
169
+	makeCleanDirectory ${TEMPDIR}/ebuilds || return 1
170 170
 	cd ${SRC}
171 171
 	saveIFS ","
172 172
 	if [ "$(toUpper ${FTC})" == "ALL" ]; then
173
-		run "cp -apf *-* ${TRASHDIR}/ebuilds/"
174
-		run "cp -apf eclass ${TRASHDIR}/ebuilds/"
175
-		run "cp -apf licenses ${TRASHDIR}/ebuilds/"
176
-		run "cp -apf virtual ${TRASHDIR}/ebuilds/"
173
+		run "cp -apf *-* ${TEMPDIR}/ebuilds/"
174
+		run "cp -apf eclass ${TEMPDIR}/ebuilds/"
175
+		run "cp -apf licenses ${TEMPDIR}/ebuilds/"
176
+		run "cp -apf virtual ${TEMPDIR}/ebuilds/"
177 177
 	else
178 178
 		for ITEM in ${FTC}; do
179
-			run "cp -apf --parents ${ITEM} ${TRASHDIR}/ebuilds/" || return 1
179
+			run "cp -apf --parents ${ITEM} ${TEMPDIR}/ebuilds/" || return 1
180 180
 		done
181 181
 	fi
182 182
 	if [ "$(toUpper ${FTS})" != "NONE" ] && [ "$(toUpper ${FTS})" != "N/A" ]; then
183 183
 		for ITEM in ${FTS}; do
184
-			rm -rf ${TRASHDIR}/ebuilds/${ITEM}
184
+			rm -rf ${TEMPDIR}/ebuilds/${ITEM}
185 185
 		done
186 186
 	fi
187 187
 	restoreIFS
188
-	cd ${TRASHDIR}/ebuilds
188
+	cd ${TEMPDIR}/ebuilds
189 189
 	find -type d -name ".svn" -o -name "CVS" | xargs rm -rf {}
190 190
 	while read CAT; do
191 191
 		cd ${CAT}
@@ -205,7 +205,7 @@ function mergeOverlay() {
205 205
 		cd ..
206 206
 	done < <(find * -maxdepth 0 -type d)
207 207
 	cd ${TOPDIR}
208
-	rm -rf ${TRASHDIR}/ebuilds
208
+	rm -rf ${TEMPDIR}/ebuilds
209 209
 	return 0
210 210
 }
211 211
 

+ 9
- 9
modules/update-notification.ezmod Wyświetl plik

@@ -10,15 +10,15 @@ ezsync_postcommit() {
10 10
 	local SENDMESG=0
11 11
 	if [ "${UPDATENOTIFY}" != "" ]; then
12 12
 		for PACKAGE in ${CHECKPACKAGES[*]}; do
13
-			makeCleanDirectory ${TRASHDIR}/ebuilds
14
-			makeDirectory ${TRASHDIR}/ebuilds/build
15
-			makeDirectory ${TRASHDIR}/ebuilds/mainline
16
-			run "cp -apf ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/${PACKAGE}/*.ebuild ${TRASHDIR}/ebuilds/build/" || return 1
17
-			run "cp -apf ${PORTAGESDIR}/${PORTAGE_MAINLINE[0]}/${PACKAGE}/*.ebuild ${TRASHDIR}/ebuilds/mainline/" || return 1
18
-			find ${TRASHDIR}/ebuilds -type f -name \*-9999\*.ebuild -exec rm -rf {} \;
19
-			BUILDVER=$(find ${TRASHDIR}/ebuilds/build -type f | sed -u -e "s/.ebuild//g" -e "s/-r/_z/g" -e "s/_p/_z/g" -e "s/_zre/_pre/" -e "s/$/_z0/" | sed "/^$/d" | sort -Vr | head -1)
13
+			makeCleanDirectory ${TEMPDIR}/ebuilds
14
+			makeDirectory ${TEMPDIR}/ebuilds/build
15
+			makeDirectory ${TEMPDIR}/ebuilds/mainline
16
+			run "cp -apf ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/${PACKAGE}/*.ebuild ${TEMPDIR}/ebuilds/build/" || return 1
17
+			run "cp -apf ${PORTAGESDIR}/${PORTAGE_MAINLINE[0]}/${PACKAGE}/*.ebuild ${TEMPDIR}/ebuilds/mainline/" || return 1
18
+			find ${TEMPDIR}/ebuilds -type f -name \*-9999\*.ebuild -exec rm -rf {} \;
19
+			BUILDVER=$(find ${TEMPDIR}/ebuilds/build -type f | sed -u -e "s/.ebuild//g" -e "s/-r/_z/g" -e "s/_p/_z/g" -e "s/_zre/_pre/" -e "s/$/_z0/" | sed "/^$/d" | sort -Vr | head -1)
20 20
 			BUILDVER=${BUILDVER##*/}
21
-			MAINLINEVER=$(find ${TRASHDIR}/ebuilds/mainline -type f | sed -u -e "s/.ebuild//g" -e "s/-r/_z/g" -e "s/_p/_z/g" -e "s/_zre/_pre/" -e "s/$/_z0/" | sed "/^$/d" | sort -Vr | head -1)
21
+			MAINLINEVER=$(find ${TEMPDIR}/ebuilds/mainline -type f | sed -u -e "s/.ebuild//g" -e "s/-r/_z/g" -e "s/_p/_z/g" -e "s/_zre/_pre/" -e "s/$/_z0/" | sed "/^$/d" | sort -Vr | head -1)
22 22
 			MAINLINEVER=${MAINLINEVER##*/}
23 23
 			NEWER=$(echo -e "${BUILDVER}\n${MAINLINEVER}" | sed "/^$/d" | sort -Vr | head -1)
24 24
 			if [[ "${NEWER}" != "${BUILDVER}" ]]; then
@@ -26,7 +26,7 @@ ezsync_postcommit() {
26 26
 				NEEDSUPDATE=${NEEDSUPDATE+"$NEEDSUPDATE, "}"${PACKAGE}"
27 27
 			fi
28 28
 		done
29
-		rm -rf ${TRASHDIR}/ebuilds
29
+		rm -rf ${TEMPDIR}/ebuilds
30 30
 		if isEnabled ${SENDMSG}; then
31 31
 			echo "The following packages needs your attention, because they probably has been updated in mainline Portage tree: ${NEEDSUPDATE}" | mailx -s "Packages need an update!" ${UPDATENOTIFY}
32 32
 		fi

Ładowanie…
Anuluj
Zapisz