Variable for scriptpath
This commit is contained in:
		
							
								
								
									
										8
									
								
								motd.sh
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								motd.sh
									
									
									
									
									
								
							@@ -1,6 +1,6 @@
 | 
				
			|||||||
# Fancy waifu motd
 | 
					# Fancy waifu motd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MOTDPATH="$HOME/.motd"          # path to motd folder
 | 
					MOTDPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"          # path to motd folder
 | 
				
			||||||
CACHEFILE="/tmp/waifu.cache"          # to cache waifu state
 | 
					CACHEFILE="/tmp/waifu.cache"          # to cache waifu state
 | 
				
			||||||
RESOLUTION=256                        # resolution of waifu
 | 
					RESOLUTION=256                        # resolution of waifu
 | 
				
			||||||
CENTER=true                           # center motd?
 | 
					CENTER=true                           # center motd?
 | 
				
			||||||
@@ -19,8 +19,8 @@ function output() {
 | 
				
			|||||||
  if [ -f "/usr/games/lolcat" ]; then lx="/usr/games/lolcat"; else lx="/usr/bin/lolcat"; fi
 | 
					  if [ -f "/usr/games/lolcat" ]; then lx="/usr/games/lolcat"; else lx="/usr/bin/lolcat"; fi
 | 
				
			||||||
  case "$val" in
 | 
					  case "$val" in
 | 
				
			||||||
    0)
 | 
					    0)
 | 
				
			||||||
      /bin/cat $MOTDPATH/motd 
 | 
					      /bin/cat $MOTDPATH/motd
 | 
				
			||||||
      uname $UNAMEARG 
 | 
					      uname $UNAMEARG
 | 
				
			||||||
      uptime $UPTIMEARG
 | 
					      uptime $UPTIMEARG
 | 
				
			||||||
      ;;
 | 
					      ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -73,5 +73,3 @@ function output() {
 | 
				
			|||||||
  fi
 | 
					  fi
 | 
				
			||||||
  output $LOLCAT $CENTER
 | 
					  output $LOLCAT $CENTER
 | 
				
			||||||
# fi
 | 
					# fi
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user