#!/bin/sh # ===================================================================== # Projet : DARKMAKE # Fichier : updateProjectFromGitHub # Auteur : Nicolas "DarkHack" Chapuis (c) 2026 # ================== DARKHACK ================== # [ darkweb.fr - system online ] # Powered by Perplexity, your AI assistant # [https://www.perplexity.ai](https://www.perplexity.ai) # ============================================== # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ===================================================================== racine="/etc/darksrv" . $racine/lib-sh/shTools shLog="$0:" shDebugEnable="1" shDebug "$*" #$(shInclude $racine/firewall/lib-sh/firewall) projectName="$1" projectUrl="$2" # initProjectFromGitHub miniupnp https://github.com/miniupnp/miniupnp.git shDebug " update from github project, [name:$projectName] [url source:$projectUrl]" pkgSourceDirectory="/srv/darkweb.fr/https/pkg" if [ ! -d "$pkgSourceDirectory/$projectName" ];then shDebug " create $pkgSourceDirectory/$projectName directory." mkdir -p "$pkgSourceDirectory/$projectName" fi cd "$pkgSourceDirectory/$projectName" if [ ! -d "$pkgSourceDirectory/$projectName/git" ];then git clone "$projectUrl" "$pkgSourceDirectory/$projectName/git" fi git pull "$projectUrl" "$pkgSourceDirectory/$projectName/git" #cd git if [ ! -d "$pkgSourceDirectory/$projectName/svn_work" ];then shDebug " create svn work repository https://pkg.darkweb.fr/$projectName $pkgSourceDirectory/$projectName/svn_work" svn co "https://pkg.darkweb.fr/$projectName" "$pkgSourceDirectory/$projectName/svn_work" fi cp -R "$pkgSourceDirectory/$projectName/git/*" "$pkgSourceDirectory/$projectName/svn_work" svn status "$pkgSourceDirectory/$projectName/svn_work"