summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2024-03-20 17:50:51 +0000
committerDaniil Baturin <daniil@baturin.org>2024-03-20 17:50:51 +0000
commit5dcb6b771106df130b4884867dc28bd685b64e40 (patch)
tree205b0730456878a4ac88e724ecbaba02887b4941 /tools
parenta690a02bdcda236be79bd84acffb6c1d05a5d4ba (diff)
downloadvyos-build-5dcb6b771106df130b4884867dc28bd685b64e40.tar.gz
vyos-build-5dcb6b771106df130b4884867dc28bd685b64e40.zip
chore: T671: remove unused scripts and references to them
Diffstat (limited to 'tools')
-rwxr-xr-xtools/get_latest_iso.py31
-rw-r--r--tools/gpl-header-template17
-rw-r--r--tools/submod-mk84
-rwxr-xr-xtools/switch-remote35
4 files changed, 0 insertions, 167 deletions
diff --git a/tools/get_latest_iso.py b/tools/get_latest_iso.py
deleted file mode 100755
index 4a2ea9a..0000000
--- a/tools/get_latest_iso.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-import sys
-from lxml import html
-from urllib.parse import unquote
-import requests
-
-BASE_URL = 'https://downloads.vyos.io/'
-PAGE_URL = BASE_URL+'?dir=rolling/current/amd64'
-
-
-def download():
- page = requests.get(PAGE_URL)
- tree = html.fromstring(page.content)
- path = '//*[@id="directory-listing"]/li/a[1]/@href'
- isos = [x for x in tree.xpath(path) if os.path.splitext(x)[1] == '.iso']
- latest_iso_url = os.path.join(BASE_URL, isos[-1])
- filename = unquote(os.path.basename(latest_iso_url))
- print(filename)
- if os.path.exists(filename):
- print("{} already exists".format(filename))
- sys.exit(0)
- r = requests.get(latest_iso_url)
- with open(filename, 'wb') as fd:
- for chunk in r.iter_content(chunk_size=128):
- fd.write(chunk)
-
-
-if __name__ == '__main__':
- download()
diff --git a/tools/gpl-header-template b/tools/gpl-header-template
deleted file mode 100644
index 63be9d9..0000000
--- a/tools/gpl-header-template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2016 VyOS maintainers and contributors
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 or later as
-# published by the Free Software Foundation.
-#
-# This program 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 General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# File:
-# Purpose:
-
diff --git a/tools/submod-mk b/tools/submod-mk
deleted file mode 100644
index eb61da1..0000000
--- a/tools/submod-mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/bash
-#
-# **** License ****
-#
-# Copyright (C) 2013 Vyatta, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program 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 General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# **** End License ****
-
-progname=${0##*/}
-shopt -s nullglob
-shopt -s extglob
-cd packages
-
-info=echo
-trace=
-noclean="-nc"
-build="debuild -i -b -uc -us"
-
-declare -a submodule
-declare -a debs
-for debian in !(installer|linux-kernel-di-i386-2.6)/debian ; do
- smod=${debian%/*}
- debs=( ${smod}_*.deb )
- if [ ${#debs[@]} -eq 0 ] ; then
- submodule+=( $smod )
- fi
-done
-
-while [ $# -gt 0 ] ; do
- case "$1" in
- -h | --help )
- cat <<-EOF
-Usage: $progname [Options] [ SUBMODULE... ]
-Options:
- -n | --do-nothing DonĀ“t actually remove or build anything,
- just show what would be done
- -q | --quiet Quiet, don't print progress info
- -c | --clean Clean build
- -b | --binary Skip source package build (default)
- -s | --source Build binary and source packages
- -S | --signed-source Build and sign packages
-
-If no SUBMODULE(s) given, build all checked-out submodules w/o debs.
-EOF
- exit 0;;
- -n | --do-nothing )
- trace=echo
- shift;;
- -q | --quiet )
- info='#'
- shift;;
- -c | --clean )
- noclean=
- shift;;
- -b | --binary )
- shift ;; # default
- -s | --source )
- build="git buildpackage -uc -us"
- shift;;
- -S | --signed-source )
- build="git buildpackage"
- shift;;
- * )
- submodule=( $@ )
- break;;
- esac
-done
-
-for (( i=0; i<${#submodule[@]}; i++)) ; do
- eval $info P: ${submodule[i]}
- ( cd ${submodule[i]} && eval $trace $build $noclean ) || exit $?
-done
diff --git a/tools/switch-remote b/tools/switch-remote
deleted file mode 100755
index 328b735..0000000
--- a/tools/switch-remote
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-HTTPS_BASE_URL="https://github.com/vyos"
-SSH_BASE_URL="git@github.com:vyos"
-
-REMOTE=`git config remote.origin.url`
-
-# extract vyatta-foo.git
-BASENAME=`echo $REMOTE | sed -re 's!.*/(.*)$!\1!'`
-echo "Changing remote for $BASENAME"
-
-# Print usage if no arguments given
-if [ -z "$1" ]; then
- echo "Switches remote URL to SSH or HTTPS"
- echo "Use \"$0 ssh\" to switch to SSH"
- echo "Use \"$0 https\" to switch to HTTPS"
-fi
-
-case $1 in
- ssh)
- echo "New remote: $SSH_BASE_URL/$BASENAME"
- git config remote.origin.url $SSH_BASE_URL/$BASENAME
- ;;
- https)
- echo "New remote: $HTTPS_BASE_URL/$BASENAME"
- git config remote.origin.url $HTTPS_BASE_URL/$BASENAME
- ;;
- *)
- echo "Wrong option, use \"ssh\" or \"https\""
- ;;
-esac
-
-
-
-