fix
This commit is contained in:
parent
2be8827f14
commit
01b724e0c3
36
install.zsh
36
install.zsh
@ -3,6 +3,7 @@
|
|||||||
function at-repos-env() {
|
function at-repos-env() {
|
||||||
host=syu.is
|
host=syu.is
|
||||||
did=did:plc:6qyecktefllvenje24fcxnie
|
did=did:plc:6qyecktefllvenje24fcxnie
|
||||||
|
icon=https://git.syui.ai/ai/at/raw/branch/main/icons/Logotype.tsx
|
||||||
repos=(
|
repos=(
|
||||||
https://github.com/did-method-plc/did-method-plc
|
https://github.com/did-method-plc/did-method-plc
|
||||||
https://github.com/bluesky-social/indigo
|
https://github.com/bluesky-social/indigo
|
||||||
@ -21,6 +22,7 @@ function at-repos-token() {
|
|||||||
handle=`cat $f|jq -r ".handle"`
|
handle=`cat $f|jq -r ".handle"`
|
||||||
did=`cat $f|jq -r ".did"`
|
did=`cat $f|jq -r ".did"`
|
||||||
token=`cat $f|jq -r ".token"`
|
token=`cat $f|jq -r ".token"`
|
||||||
|
host=${host##*/}
|
||||||
fi
|
fi
|
||||||
name=${host%%.*}
|
name=${host%%.*}
|
||||||
domain=${host##*.}
|
domain=${host##*.}
|
||||||
@ -56,7 +58,6 @@ function at-repos-pull() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
cd $d
|
cd $d
|
||||||
echo "docker compose build && docker compose up -d"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function at-repos-social-app-icon() {
|
function at-repos-social-app-icon() {
|
||||||
@ -68,7 +69,15 @@ function at-repos-social-app-icon() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function at-repos-social-app-icon-origin() {
|
function at-repos-social-app-icon-origin() {
|
||||||
curl -sL https://git.syui.ai/ai/at/raw/branch/main/icons/Logotype.tsx -o $d/icons/Logotype.tsx
|
curl -sL $icon -o $d/icons/Logotype.tsx
|
||||||
|
}
|
||||||
|
|
||||||
|
function at-repos-social-app-rm() {
|
||||||
|
dt=$d/repos/social-app/src
|
||||||
|
f=$dt/view/com/util/UserAvatar.tsx
|
||||||
|
rm $f
|
||||||
|
f=$dt/lib/constants.ts
|
||||||
|
rm $f
|
||||||
}
|
}
|
||||||
|
|
||||||
function at-repos-social-app-write() {
|
function at-repos-social-app-write() {
|
||||||
@ -76,9 +85,10 @@ function at-repos-social-app-write() {
|
|||||||
|
|
||||||
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/${domain}/g"
|
grep -R bsky.social .|cut -d : -f 1|sort -u|xargs sed -i "s/bsky.social/${host}/g"
|
||||||
grep -R bsky.app .|cut -d : -f 1|sort -u|xargs sed -i "s/bsky.app/web.${domain}/g"
|
grep -R bsky.app .|cut -d : -f 1|sort -u|xargs sed -i "s/bsky.app/web.${host}/g"
|
||||||
sed -i "s/public.api.web/bsky/g" ./lib/constants.ts
|
f=$dt/lib/constants.ts
|
||||||
|
sed -i "s/public.api.web/bsky/g" $f
|
||||||
f=$dt/view/icons/Logotype.tsx
|
f=$dt/view/icons/Logotype.tsx
|
||||||
o=$d/icons/Logotype.tsx
|
o=$d/icons/Logotype.tsx
|
||||||
cp -rf $o $f
|
cp -rf $o $f
|
||||||
@ -86,21 +96,27 @@ 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.bsky.app/img/avatar/plain/#g" $f
|
||||||
sed -i "s#/img/avatar_thumbnail/plain/#https://bsky.${domain}/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
|
||||||
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"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function at-repos-docker() {
|
||||||
|
cd $d
|
||||||
|
docker compose build && docker compose up -d
|
||||||
|
}
|
||||||
|
|
||||||
at-repos-env
|
at-repos-env
|
||||||
at-repos-token
|
at-repos-token
|
||||||
at-repos-clone
|
at-repos-clone
|
||||||
|
at-repos-social-app-rm
|
||||||
at-repos-pull
|
at-repos-pull
|
||||||
at-repos-social-app-icon
|
at-repos-social-app-icon
|
||||||
|
at-repos-social-app-icon-origin
|
||||||
|
at-repos-social-app-write
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
icon|i)
|
docker|d)
|
||||||
at-repos-social-app-icon-origin
|
at-repos-docker
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
at-repos-social-app-write
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user