initial commit of file from CVS for smeserver-mock on Thu 26 Oct 11:20:16 BST 2023

This commit is contained in:
2023-10-26 11:20:16 +01:00
parent 0fb71cc6e5
commit 00b6cc6808
21 changed files with 1655 additions and 2 deletions

57
root/usr/bin/refresh Normal file
View File

@@ -0,0 +1,57 @@
#!/bin/bash
if [ $# -eq 0 ]
then
echo "No arguments supplied"
echo "Usage:
refresh [sme|contribs]
examples:
# refresh sme
This script will refresh or create the tree for smeserver (sme) or smecontribs (contribs).
"
exit
fi
sme=$1
if [[ "$sme" != "sme" && "$sme" != "contribs" ]]
then
echo "Wrong first parameter should be either 'sme' or 'contribs'"
exit
fi
packageroot='smecontribs'
if [[ "$sme" == "sme" ]]
then
packageroot='smeserver'
fi
#create if missing
if [ ! -d ~/$packageroot ]
then
"creating ~/$packageroot and populating..."
mkdir -p ~/$packageroot
cd ~/$packageroot
cvs -Q -z3 -d:ext:shell.koozali.org:/cvs/$packageroot co -P CVSROOT rpms common 1>/dev/null
exit
fi
if [[ "$2" == "force" ]]
then
"Forcing checkout for ~/$packageroot and populating with CVSROOT rpms common..."
mkdir -p ~/$packageroot
cvs -Q -z3 -d:ext:shell.koozali.org:/cvs/$packageroot co -P CVSROOT rpms common 1>/dev/null
exit
fi
# check if module rpms exist and populate it if necessary or update it
if [ -d ~/$packageroot/rpms ]
then
# update current tree
cd ~/$packageroot/rpms
cvs -Q update -dPA 1>/dev/null
else
# checkout rpms
cd ~/$packageroot
cvs -Q -z3 -d:ext:shell.koozali.org:/cvs/$packageroot co -P rpms 1>/dev/null
fi