Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:favogt:symbolictw
susepaste
0003-susepaste-use-paste-opensuse.org.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0003-susepaste-use-paste-opensuse.org.patch of Package susepaste
From d3163122635831c4790da5206501cd36559af724 Mon Sep 17 00:00:00 2001 From: Jacob Michalskie <hel@lcp.world> Date: Sun, 4 Dec 2022 19:27:25 +0100 Subject: [PATCH 1/3] Use paste.opensuse.org as the primary address in susepaste script --- script/susepaste | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/susepaste b/script/susepaste index b09ba16..06d701d 100755 --- a/script/susepaste +++ b/script/susepaste @@ -121,17 +121,17 @@ URL="` curl -v -F "$TYPE=$INPUT" -F "title=$TITLE" -F "expire=$EXPIRE" \ -F "name=$NICK" -F "submit=submit" -F "lang=$SYNTAX" \ $API_KEY \ - ${SCHEMA}://susepaste.org 2>&1 | sed -n 's|<\ [lL]ocation:\ ||p' `" + ${SCHEMA}://paste.opensuse.org 2>&1 | sed -n 's|<\ [lL]ocation:\ ||p' `" # Check the results and inform the user -if expr "$URL" : "^${SCHEMA}://susepaste.org/[0-9a-f]\+" > /dev/null; then - ID="`echo "$URL" | sed 's|^'"${SCHEMA}"'://susepaste.org/\([0-9a-f]\+\)[^0-9a-f]*|\1|'`" +if expr "$URL" : "^${SCHEMA}://paste.opensuse.org/[0-9a-f]\+" > /dev/null; then + ID="`echo "$URL" | sed 's|^'"${SCHEMA}"'://paste.opensuse.org/\([0-9a-f]\+\)[^0-9a-f]*|\1|'`" echo "Pasted as:" echo " ${SCHEMA}://susepaste.org/$ID" echo " ${SCHEMA}://paste.opensuse.org/$ID" if [ -x /usr/bin/xclip ]; then - echo "${SCHEMA}://susepaste.org/$ID" | xclip -selection XA_CLIPBOARD + echo "${SCHEMA}://paste.opensuse.org.org/$ID" | xclip -selection XA_CLIPBOARD echo "Link is also in your clipboard." fi else From 7923a7c5a88b0fa155aea3b2af5a3a60f8bc175f Mon Sep 17 00:00:00 2001 From: Jacob Michalskie <hel@lcp.world> Date: Sun, 4 Dec 2022 19:28:51 +0100 Subject: [PATCH 2/3] Also use primarily paste.opensuse.org in susepaste-screenshot --- script/susepaste-screenshot | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/susepaste-screenshot b/script/susepaste-screenshot index 057d41f..42bd0f7 100755 --- a/script/susepaste-screenshot +++ b/script/susepaste-screenshot @@ -96,19 +96,19 @@ URL="` curl -v -F "file=@$TMP" -F "title=$TITLE" -F "expire=$EXPIRE" \ -F "name=$NICK" -F "submit=submit" -F "lang=image" \ $API_KEY \ - http://susepaste.org 2>&1 | sed -n 's|<\ [lL]ocation:\ ||p' `" + http://paste.opensuse.org 2>&1 | sed -n 's|<\ [lL]ocation:\ ||p' `" rm -f "$TMP" # Check the results and inform the user -if expr "$URL" : "^http://susepaste.org/[0-9a-f]\+" > /dev/null; then - ID="`echo "$URL" | sed 's|^http://susepaste.org/\([0-9a-f]\+\)[^0-9a-f]*|\1|'`" +if expr "$URL" : "^http://paste.opensuse.org/[0-9a-f]\+" > /dev/null; then + ID="`echo "$URL" | sed 's|^http://paste.opensuse.org/\([0-9a-f]\+\)[^0-9a-f]*|\1|'`" TEXT="Pasted as: http://susepaste.org/$ID http://paste.opensuse.org/$ID" if [ -x /usr/bin/xclip ]; then - echo "http://susepaste.org/$ID" | xclip -selection XA_CLIPBOARD + echo "http://paste.opensuse.org/$ID" | xclip -selection XA_CLIPBOARD TEXT="$TEXT Link is also in your clipboard." fi From c6646fd86475f480f62de6b8bf57d3f653c55d32 Mon Sep 17 00:00:00 2001 From: Jacob Michalskie <hel@lcp.world> Date: Sun, 4 Dec 2022 22:00:35 +0100 Subject: [PATCH 3/3] Get rid of additional .org --- script/susepaste | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/susepaste b/script/susepaste index 06d701d..3504c15 100755 --- a/script/susepaste +++ b/script/susepaste @@ -131,7 +131,7 @@ if expr "$URL" : "^${SCHEMA}://paste.opensuse.org/[0-9a-f]\+" > /dev/null; then echo " ${SCHEMA}://susepaste.org/$ID" echo " ${SCHEMA}://paste.opensuse.org/$ID" if [ -x /usr/bin/xclip ]; then - echo "${SCHEMA}://paste.opensuse.org.org/$ID" | xclip -selection XA_CLIPBOARD + echo "${SCHEMA}://paste.opensuse.org/$ID" | xclip -selection XA_CLIPBOARD echo "Link is also in your clipboard." fi else
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor