mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-10 03:50:33 +03:00
add support for /home/sbo/local; check if SLACKVER is 'local' before trying to do rsync.
This commit is contained in:
parent
7279ec8fd2
commit
54fda65ea5
@ -182,7 +182,7 @@ check_write () {
|
||||
|
||||
check_if_repo_exists () {
|
||||
# Check to see if $LOCALREPO/$SLACKVER exists and not empty
|
||||
if [ ! -d $LOCALREPO/$SLACKVER/academic ]; then
|
||||
if [ ! -d $LOCALREPO/$SLACKVER/ ]; then
|
||||
if [ "$DIAG" = 1 ]; then
|
||||
dialog --title "ERROR" --msgbox "$(crunch "The directory \
|
||||
$LOCALREPO/$SLACKVER was not found or is empty. Please make \
|
||||
@ -727,11 +727,12 @@ select_version () {
|
||||
--menu "$(crunch "You are currently using sbopkg to browse a \
|
||||
local copy of SBo for Slackware version $SLACKVER. If you would \
|
||||
like to change it, please select another version below or press \
|
||||
<Back> to go back.")" 15 50 4 \
|
||||
<Back> to go back.")" 15 50 5 \
|
||||
"12.2" "Slackware version 12.2" \
|
||||
"12.1" "Slackware version 12.1" \
|
||||
"12.0" "Slackware version 12.0" \
|
||||
"11.0" "Slackware version 11.0" 2>$TMP/sbopkg_version_selection
|
||||
"11.0" "Slackware version 11.0" \
|
||||
"local" "Local repository" 2>$TMP/sbopkg_version_selection
|
||||
if [ $? != 0 ]; then
|
||||
break
|
||||
fi
|
||||
@ -1418,6 +1419,12 @@ rsync_command () {
|
||||
|
||||
rsync_repo () {
|
||||
# This function does the rsync with SBo.
|
||||
if [ "$SLACKVER" = "local" ]; then
|
||||
dialog --title "ERROR" --msgbox \
|
||||
"You cannot rsync when using the /home/sbo/local repository." \
|
||||
8 30
|
||||
continue
|
||||
fi
|
||||
directory_checks
|
||||
check_write $LOCALREPO/$SLACKVER/
|
||||
if [ "$WRITE" = "false" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user