File:  [Coherent Logic Development] / freem / scripts / fmd-update
Revision 1.1: download - view: text, annotated - select for diffs
Thu Apr 10 18:18:12 2025 UTC (8 weeks, 2 days ago) by snw
Branches: MAIN
CVS tags: HEAD
Add fmd update

#!/usr/bin/env bash

#
#   $Id: fmd-update,v 1.1 2025/04/10 18:18:12 snw Exp $
#    Update the CVS repository
#
#  
#   Author: Serena Willis <snw@coherent-logic.com>
#    Copyright (C) 2025 Coherent Logic Development LLC
#
#
#   This file is part of FreeM.
#
#   FreeM is free software: you can redistribute it and/or modify
#   it under the terms of the GNU Affero Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   FreeM is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU Affero Public License for more details.
#
#   You should have received a copy of the GNU Affero Public License
#   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
#
#   $Log: fmd-update,v $
#   Revision 1.1  2025/04/10 18:18:12  snw
#   Add fmd update
#
#
# SPDX-FileCopyrightText:  (C) 2025 Coherent Logic Development LLC
# SPDX-License-Identifier: AGPL-3.0-or-later
#

PGM=$(basename $0)
SCRIPT_DIR=$(dirname "$0")

source "${SCRIPT_DIR}/_fmd_common.bash"

function usage() {
    echo
    echo "Updates your working copy of the FreeM CVS repository"
    echo    
    echo "usage:  "
    echo
    echo "  fmd update"
    echo
    exit 0
}

if [[ $1 == "help" ]]
then
    usage
fi

if [[ $# == 0 ]]
then
    echo "${PGM}:  must be run as 'fmd update'"
    exit 1
fi

FMD=$1

echo -n "${PGM}:  updating this copy of the FreeM CVS repository... "
cvs update -Pd &>/dev/null
if [[ $? == 0 ]]
then
    echo "[OK]"
else
    echo "[FAIL]"
fi

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>