update scpt
This commit is contained in:
		
							
								
								
									
										30
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								build.sh
									
									
									
									
									
								
							@@ -1,30 +0,0 @@
 | 
				
			|||||||
#!/bin/zsh
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
d=${0:a:h}
 | 
					 | 
				
			||||||
cd $d/repos
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
t="
 | 
					 | 
				
			||||||
https://github.com/bluesky-social/atproto
 | 
					 | 
				
			||||||
https://github.com/did-method-plc/did-method-plc
 | 
					 | 
				
			||||||
https://github.com/bluesky-social/feed-generator
 | 
					 | 
				
			||||||
https://github.com/bluesky-social/social-app
 | 
					 | 
				
			||||||
https://github.com/bluesky-social/cookbook
 | 
					 | 
				
			||||||
https://github.com/itaru2622/bluesky-selfhost-env
 | 
					 | 
				
			||||||
"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
t=`echo $t|grep -v '^$'`
 | 
					 | 
				
			||||||
n=`echo $t|wc -l`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
for ((i=1;i<=$n;i++))
 | 
					 | 
				
			||||||
do
 | 
					 | 
				
			||||||
	tt=`echo $t|awk "NR==$i"`
 | 
					 | 
				
			||||||
	dd=$d/repos/$tt:t
 | 
					 | 
				
			||||||
	if [ -d $dd ];then
 | 
					 | 
				
			||||||
		echo ok
 | 
					 | 
				
			||||||
		cd $dd
 | 
					 | 
				
			||||||
		git pull
 | 
					 | 
				
			||||||
		cd $d/repos
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		git clone $tt
 | 
					 | 
				
			||||||
	fi
 | 
					 | 
				
			||||||
done
 | 
					 | 
				
			||||||
							
								
								
									
										83
									
								
								install.zsh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										83
									
								
								install.zsh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,83 @@
 | 
				
			|||||||
 | 
					#!/bin/zsh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					d=${0:a:h}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					repos=(
 | 
				
			||||||
 | 
						https://github.com/did-method-plc/did-method-plc
 | 
				
			||||||
 | 
						https://github.com/bluesky-social/indigo
 | 
				
			||||||
 | 
						https://github.com/bluesky-social/atproto
 | 
				
			||||||
 | 
						https://github.com/bluesky-social/social-app
 | 
				
			||||||
 | 
						https://github.com/bluesky-social/feed-generator
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function run-env() {
 | 
				
			||||||
 | 
						host=syu.is
 | 
				
			||||||
 | 
						name=${host%%.*}
 | 
				
			||||||
 | 
						domain=${host##*.}
 | 
				
			||||||
 | 
						dh=${0:a:h:h}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function run-dl() {
 | 
				
			||||||
 | 
						mkdir -p $d/repos
 | 
				
			||||||
 | 
						cd $d/repos
 | 
				
			||||||
 | 
						for ((i=1; i<=${#repos}; i++)); do
 | 
				
			||||||
 | 
							repo=${repos[$i]}
 | 
				
			||||||
 | 
							echo $repo
 | 
				
			||||||
 | 
							if [ ! -d $d/repos/${repo##*/} ];then
 | 
				
			||||||
 | 
								git clone $repo
 | 
				
			||||||
 | 
							fi
 | 
				
			||||||
 | 
						done
 | 
				
			||||||
 | 
						if [ ! -f $d/repos/feed-generator/Dockerfile ];then
 | 
				
			||||||
 | 
							cp -rf $d/docker/feed/Dockerfile $d/repos/feed-generator/
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function run-update() {
 | 
				
			||||||
 | 
						cd $d/repos
 | 
				
			||||||
 | 
						for ((i=1; i<=${#repos}; i++)); do
 | 
				
			||||||
 | 
							repo=${repos[$i]}
 | 
				
			||||||
 | 
							echo $repo
 | 
				
			||||||
 | 
							if [ -d $d/repos/${repo##*/} ];then
 | 
				
			||||||
 | 
								cd $d/repos/${repo##*/}
 | 
				
			||||||
 | 
								git pull
 | 
				
			||||||
 | 
							fi
 | 
				
			||||||
 | 
						done
 | 
				
			||||||
 | 
						cd $d
 | 
				
			||||||
 | 
						echo "docker compose build && docker compose up -d"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function run-dl-icon() {
 | 
				
			||||||
 | 
						curl -sL https://raw.githubusercontent.com/bluesky-social/social-app/main/src/view/icons/Logotype.tsx -o $d/repos/social-app/src/view/icons/Logotype.tsx
 | 
				
			||||||
 | 
						cp -rf $d/repos/social-app/src/view/icons/Logotype.tsx $d/icons/
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function web-write() {
 | 
				
			||||||
 | 
						dt=$d/repos/social-app/src
 | 
				
			||||||
 | 
						cd $dt
 | 
				
			||||||
 | 
						grep -R bsky.social .|cut -d : -f 1|sort -u|xargs sed -i "s/bsky.social/syu.is/g"
 | 
				
			||||||
 | 
						grep -R bsky.app .|cut -d : -f 1|sort -u|xargs sed -i "s/bsky.app/web.syu.is/g"
 | 
				
			||||||
 | 
						grep -R public.api.syu.is ./lib/constants.ts | cut -d : -f 1|sort -u|xargs sed -i "s/public.api/bsky/g"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						f=$dt/view/icons/Logotype.tsx
 | 
				
			||||||
 | 
						o=$d/icons/Logotype.tsx
 | 
				
			||||||
 | 
						cp -rf $o $f
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						#curl -sL https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/src/view/com/util/UserAvatar.tsx -o $f
 | 
				
			||||||
 | 
						f=$dt/view/com/util/UserAvatar.tsx
 | 
				
			||||||
 | 
						sed -i $t "s#/img/avatar/plain/#https://cdn.bsky.app/img/avatar/plain/#g" $f
 | 
				
			||||||
 | 
						sed -i $t "s#/img/avatar_thumbnail/plain/#https://bsky.syu.is/img/avatar/plain/#g" $f
 | 
				
			||||||
 | 
						sed -i $t "s#source={{uri: avatar}}#source={{ uri: hackModifyThumbnailPath(avatar, 1 > 0), }}#g" $f
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					run-env
 | 
				
			||||||
 | 
					run-dl
 | 
				
			||||||
 | 
					case $1 in
 | 
				
			||||||
 | 
						update)
 | 
				
			||||||
 | 
							run-update
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
 | 
						web)
 | 
				
			||||||
 | 
							web-write
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 Submodule repos/atproto updated: 8f2b80a0dc...22a96d6b74
									
								
							 Submodule repos/did-method-plc updated: 13da315787...39f28d196f
									
								
							 Submodule repos/feed-generator updated: 9a887dd8f2...c14c54bd65
									
								
							
							
								
								
									
										1
									
								
								repos/indigo
									
									
									
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								repos/indigo
									
									
									
									
									
										Submodule
									
								
							 Submodule repos/indigo added at c130614850
									
								
							 Submodule repos/social-app updated: f6649e22a7...6c9e1d4837
									
								
							
		Reference in New Issue
	
	Block a user