mirror of
https://github.com/sbopkg/sbopkg
synced 2024-12-29 10:24:11 +01: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
1 changed files with 10 additions and 3 deletions
|
@ -182,7 +182,7 @@ check_write () {
|
||||||
|
|
||||||
check_if_repo_exists () {
|
check_if_repo_exists () {
|
||||||
# Check to see if $LOCALREPO/$SLACKVER exists and not empty
|
# 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
|
if [ "$DIAG" = 1 ]; then
|
||||||
dialog --title "ERROR" --msgbox "$(crunch "The directory \
|
dialog --title "ERROR" --msgbox "$(crunch "The directory \
|
||||||
$LOCALREPO/$SLACKVER was not found or is empty. Please make \
|
$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 \
|
--menu "$(crunch "You are currently using sbopkg to browse a \
|
||||||
local copy of SBo for Slackware version $SLACKVER. If you would \
|
local copy of SBo for Slackware version $SLACKVER. If you would \
|
||||||
like to change it, please select another version below or press \
|
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.2" "Slackware version 12.2" \
|
||||||
"12.1" "Slackware version 12.1" \
|
"12.1" "Slackware version 12.1" \
|
||||||
"12.0" "Slackware version 12.0" \
|
"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
|
if [ $? != 0 ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
@ -1418,6 +1419,12 @@ rsync_command () {
|
||||||
|
|
||||||
rsync_repo () {
|
rsync_repo () {
|
||||||
# This function does the rsync with SBo.
|
# 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
|
directory_checks
|
||||||
check_write $LOCALREPO/$SLACKVER/
|
check_write $LOCALREPO/$SLACKVER/
|
||||||
if [ "$WRITE" = "false" ]; then
|
if [ "$WRITE" = "false" ]; then
|
||||||
|
|
Loading…
Reference in a new issue