This commit is contained in:
emmett1
2017-12-08 16:04:01 +08:00
parent 330f3a00c8
commit 00a6cea8a8
6 changed files with 145 additions and 69 deletions

View File

@@ -1,8 +1,8 @@
#!/bin/bash
. /usr/share/scratchpkg/functions || exit 1
export LC_ALL=C
. /usr/share/scratchpkg/functions || exit 1
spkglock() {
@@ -527,8 +527,13 @@ main() {
exit 0
fi
### CHECK FOR ROOT ACCESS ###
needroot "Installing package"
check_directory
### CHECK DIRECTORY ###
checkdirexist "$INDEX_DIR" "$BACKUP_DIR" "$REJECTED_DIR"
checkdirwrite "$INDEX_DIR" "$BACKUP_DIR" "$REJECTED_DIR"
checkdirread "$INDEX_DIR" "$BACKUP_DIR" "$REJECTED_DIR"
### CHECK FOR LOCK FILE ###
if [ -f /tmp/spkg.lock ]; then