update scpt
This commit is contained in:
parent
6f4712e461
commit
ded3110fce
37
install.zsh
37
install.zsh
@ -1,7 +1,7 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
# ./install.zsh $HOST
|
# ./install.zsh $HOST
|
||||||
|
repos_v='{}'
|
||||||
function at-repos-env() {
|
function at-repos-env() {
|
||||||
host=$1
|
host=$1
|
||||||
if [ -z "$1" ];then
|
if [ -z "$1" ];then
|
||||||
@ -57,6 +57,7 @@ function at-repos-clone() {
|
|||||||
echo $repo
|
echo $repo
|
||||||
if [ ! -d $d/repos/${repo##*/} ];then
|
if [ ! -d $d/repos/${repo##*/} ];then
|
||||||
git clone $repo
|
git clone $repo
|
||||||
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ ! -f $d/repos/feed-generator/Dockerfile ] && [ -f $d/docker/feed/Dockerfile ];then
|
if [ ! -f $d/repos/feed-generator/Dockerfile ] && [ -f $d/docker/feed/Dockerfile ];then
|
||||||
@ -76,6 +77,12 @@ function at-repos-pull() {
|
|||||||
at-repos-clone
|
at-repos-clone
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
rv=$(echo "$repos_v" | jq -r ".[\"${repo##*/}\"]")
|
||||||
|
if [ "$rv" != "null" ];then
|
||||||
|
cd $d/repos/${repo##*/}
|
||||||
|
git reset --hard $rv
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
cd $d
|
cd $d
|
||||||
}
|
}
|
||||||
@ -93,12 +100,12 @@ function at-repos-social-app-icon-origin() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function at-repos-social-app-write() {
|
function at-repos-social-app-write() {
|
||||||
did_admin=did:plc:z72i7hdynmk6r22z27h6tvur
|
did_admin=did:plc:6qyecktefllvenje24fcxnie
|
||||||
|
|
||||||
dt=$d/repos/social-app/src
|
dt=$d/repos/social-app/src
|
||||||
cd $dt
|
cd $dt
|
||||||
grep -R bsky.social .|cut -d : -f 1|sort -u|xargs sed -i "s/bsky.social/${host}/g"
|
grep -R syu.is .|cut -d : -f 1|sort -u|xargs sed -i "s/syu.is/${host}/g"
|
||||||
grep -R bsky.app .|cut -d : -f 1|sort -u|xargs sed -i "s/bsky.app/web.${host}/g"
|
grep -R web.syu.is .|cut -d : -f 1|sort -u|xargs sed -i "s/web.syu.is/web.${host}/g"
|
||||||
f=$dt/lib/constants.ts
|
f=$dt/lib/constants.ts
|
||||||
sed -i "s/public.api.web/bsky/g" $f
|
sed -i "s/public.api.web/bsky/g" $f
|
||||||
f=$dt/view/icons/Logotype.tsx
|
f=$dt/view/icons/Logotype.tsx
|
||||||
@ -107,11 +114,11 @@ function at-repos-social-app-write() {
|
|||||||
|
|
||||||
f=$dt/view/com/util/UserAvatar.tsx
|
f=$dt/view/com/util/UserAvatar.tsx
|
||||||
curl -sL https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/src/view/com/util/UserAvatar.tsx -o $f
|
curl -sL https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/src/view/com/util/UserAvatar.tsx -o $f
|
||||||
sed -i "s#/img/avatar/plain/#https://cdn.bsky.app/img/avatar/plain/#g" $f
|
sed -i "s#/img/avatar/plain/#https://cdn.web.syu.is/img/avatar/plain/#g" $f
|
||||||
sed -i "s#/img/avatar_thumbnail/plain/#https://bsky.${host}/img/avatar/plain/#g" $f
|
sed -i "s#/img/avatar_thumbnail/plain/#https://bsky.${host}/img/avatar/plain/#g" $f
|
||||||
sed -i "s#source={{uri: avatar}}#source={{ uri: hackModifyThumbnailPath(avatar, 1 > 0), }}#g" $f
|
sed -i "s#source={{uri: avatar}}#source={{ uri: hackModifyThumbnailPath(avatar, 1 > 0), }}#g" $f
|
||||||
curl -sL https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/src/lib/strings/url-helpers.ts -o $dt/lib/strings/url-helpers.ts
|
curl -sL https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/src/lib/strings/url-helpers.ts -o $dt/lib/strings/url-helpers.ts
|
||||||
sed -i "s#https://go.bsky.app/redirect?u=\${encodeURIComponent(url)}#\${url}#g" $dt/lib/strings/url-helpers.ts
|
sed -i "s#https://go.web.syu.is/redirect?u=\${encodeURIComponent(url)}#\${url}#g" $dt/lib/strings/url-helpers.ts
|
||||||
grep -R $did_admin .|cut -d : -f 1|sort -u|xargs sed -i "s/${did_admin}/${did}/g"
|
grep -R $did_admin .|cut -d : -f 1|sort -u|xargs sed -i "s/${did_admin}/${did}/g"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +131,7 @@ function at-repos-bsky-patch() {
|
|||||||
if [ ! -f ${p_} ];then
|
if [ ! -f ${p_} ];then
|
||||||
# https://github.com/itaru2622/bluesky-selfhost-env/blob/master/patching/105-atproto-services-for-docker.diff
|
# https://github.com/itaru2622/bluesky-selfhost-env/blob/master/patching/105-atproto-services-for-docker.diff
|
||||||
echo download patch: https://github.com/itaru2622/bluesky-selfhost-env/blob/master/patching/105-atproto-services-for-docker.diff
|
echo download patch: https://github.com/itaru2622/bluesky-selfhost-env/blob/master/patching/105-atproto-services-for-docker.diff
|
||||||
curl -sLO https://raw.githubusercontent.com/itaru2622/bluesky-selfhost-env/refs/heads/master/patching/105-atproto-services-for-docker.diff
|
curl -sL https://raw.githubusercontent.com/itaru2622/bluesky-selfhost-env/refs/heads/master/patching/105-atproto-services-for-docker.diff -o ${p_}
|
||||||
else
|
else
|
||||||
echo local patch
|
echo local patch
|
||||||
fi
|
fi
|
||||||
@ -183,10 +190,12 @@ at-repos-bsky-patch
|
|||||||
at-repos-social-app-patch
|
at-repos-social-app-patch
|
||||||
at-repos-ozone-patch
|
at-repos-ozone-patch
|
||||||
|
|
||||||
echo "[y]docker compose build && up"
|
at-repos-docker
|
||||||
read key
|
#echo "[y]docker compose build && up"
|
||||||
case $key in
|
#read key
|
||||||
[yY])
|
#case $key in
|
||||||
at-repos-docker
|
# [yY])
|
||||||
;;
|
# at-repos-docker
|
||||||
esac
|
# ;;
|
||||||
|
#esac
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user